...
__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__
:
...
CERT C++ Secure Coding Standard: PRE05-CPP. Understand macro replacement when concatenating tokens or performing stringification
ISO/IEC 9899:2011 Section 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 macro names"
...