![]() |
![]() |
1036 | ![]() |
||||
![]() | |||||||
| Language extensions | |||||||
A comma has been suppressed in the expansion of this macro. This happens because a ## token has been inserted in front of the variable argument list token __VA_ARGS__ in the definition of this macro. The function of this token is to require that the preceding comma should be removed if the variable argument list happens to be empty. This is a language extension and is not recognised syntax in ISO:C. For example:
/*PRQA S 336,602,1307,2017,3122,3209,3408,3429,3602,3625 ++*/
#include <stdio.h>
#define DF2(format, ...) (void)fprintf (stderr, format, ##__VA_ARGS__) /* Message 1030 and 1038 */
extern void foo(void)
{
DF2 ("A message"); /* Message 0850 1035 and 1036 */
}
MISRA-C:2004 Rules applicable to message 1036:
| Rule 1.1 (Required) | All code shall conform to ISO/IEC 9899:1990 C programming language, ISO 9899, amended and corrected by ISO/IEC 9899/COR1:1995, ISO/IEC 9899/AMD1:1995, and ISO/IEC 9899/COR2: 1996192 |
See also:
![]() | ||
| QA·C Source Code Analyser 8.1
MISRA-C:2004 Compliance Module 3.2 © 2012 Programming Research. www.programmingresearch.com | Personality Groups | Glossary | Message Index | MISRA-C:2004 Rule Index | Contents |