Versions Compared

Key

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

...

__LINE__ is a predefined macro name that expands to an integer constant representing the presumed line number of the current source line within the current source file [ISO/IEC 9899:2011]. If the intention is to expand the __LINE__ macro, which is likely the case here, the following definition for JOIN() is noncompliant because the __LINE__ is not expanded, and the character array is subsequently named assertion_failed_at_line___LINE__:

...

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

Related Guidelines

...

Bibliography

[FSF 2005]Section 3.4, "Stringification," and section 3.5, "Concatenation"
[ISO/IEC 9899:2011

...

]Section 6.10.3, "Macro

...

Replacement," section 6.10.3.2, "The #

...

Operator," section 6.10.3.3, "The ##

...

Operator,"
section 6.10.3.4, "Rescanning and

...

Further Replacement," and section 6.10.8, "Predefined

...

Bibliography

...

Macro Names"
[Saks 2008]