Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Parenthesize all parameter names in macro definitions. See also recommendations PRE00-C. Prefer inline or static functions to function-like macros and PRE02-C. Macro replacement lists should be parenthesized.

...

Code Block
#define JOIN(a, b) (a ## b)
#define SHOW(a) printf(#a " = %d\n", a)

See recommendation PRE05-C. Understand macro replacement when concatenating tokens or performing stringification for more information on using the ## operator to concatenate tokens.

...

ToolVersionCheckerDescription

LDRA tool suite

 
Include Page
LDRA_V
LDRA_V

78 S

Fully Implemented

ECLAIR

 
Include Page
ECLAIR_V
ECLAIR_V

macrbody

Fully Implemented

 

 

 

...

Tool

...

Version

...

Checker

...

Description

...

Section

LDRA tool suite

...

Section

78 S

...

Section

Fully Implemented

...

Section

ECLAIR

...

Section

macrbody

...

Section

Fully Implemented

Related Vulnerabilities

Search for vulnerabilities resulting from the violation of this rule on the CERT website.

...

CERT C++ Secure Coding Standard: PRE01-CPP. Use parentheses within macros around parameter names

ISO/IEC 9899:19992011 Section 6.10, "Preprocessing directives," and Section 5.1.1, "Translation environment"

...