[previous] 0802 [next] [C] The '##' operator may not be the last token in a macro replacement list.
Constraint violations REFERENCE - ISO:C90-6.8.3.3 The ## Operator - Constraints

This is a constraint error

The glue operator, '##', has appeared as the last token in the replacement list of a macro. This makes no sense because the function of ## is to join the tokens on either side of it when the macro is expanded.

For example:


/*PRQA S 553,2017,3429 ++*/

#define GLUE(a) a ##           /* Message 0802 */


MISRA C:2012 Rules applicable to message 0802:

Rule-1.1  (Required) The program shall contain no violations of the standard C syntax and constraints, and shall not exceed the implementation's translation limits


See also:

QA·C Source Code Analyser 8.1
MISRA C:2012 Compliance Module 1.0
© 2012 Programming Research.
www.programmingresearch.com
Personality Groups | Glossary | Message Index | MISRA C:2012 Rule Index Contents