![]() |
![]() |
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 */
}
See also:
![]() | ||
| QA·C Source Code Analyser 8.1.2
© 2013 Programming Research. www.programmingresearch.com | Personality Groups | Glossary | Message Index | Contents |