![]() |
![]() |
0811 | ![]() |
||||
![]() | |||||||
| Constraint violations | REFERENCE - ISO:C90-6.1.5 Operators - Constraints | ||||||
This is a constraint error The glue operator, ##, can only be used in a #define directive. Its function is to join the 2 tokens on either side of it. For example:
/*PRQA S 752,2017,3122,3408,3429,3447,3625 ++*/
#define GLUE(A,B) A##B
extern void foo(int p);
extern int abcdef;
void ft(void)
{
foo( GLUE( abc, def ) ); /* OK */
foo( abc ## def ); /* Message 0811 and others */
}
MISRA C:2012 Rules applicable to message 0811:
| 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 |
![]() | ||
| 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 |