[previous] 1034 [next] [E] Macro defined with named variable argument list. This is a language extension.
Language extensions

A macro is being defined with a named variable argument list. This syntax is not recognized in either ISO:C90 or ISO:C99; but it is supported by some C compilers.

If a variable argument list is required, ISO:C99 provides a preferred syntax.

For example:


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

#define D1(fmt, args...) fprintf(stderr, fmt, args)         /* Message 1034 */

#define D2(fmt, ...) fprintf(stderr, fmt, __VA_ARGS__)      /* Message 1030 */


MISRA-C:2004 Rules applicable to message 1034:

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