MISRA C:2023 Rule 17.1
Description
Rule Definition
The standard header file <stdarg.h> shall not be used.1
Rationale
The rule forbids use of va_list, va_arg, va_start, va_end,
and va_copy.
It is possible to use these features in ways where the behavior is not defined in the Standard. For instance:
You invoke
va_startin a function but do not invoke the correspondingva_endbefore the function block ends.You invoke
va_argin different functions on the same variable of typeva_list.va_arghas the syntaxtype va_arg (va_list ap, type).You invoke
va_argwith atypethat is incompatible with the actual type of the argument retrieved fromap.
Troubleshooting
If you expect a rule violation but do not see it, refer to Diagnose Why Coding Standard Violations Do Not Appear as Expected.
Examples
Check Information
| Group: Function |
| Category: Required |
| AGC Category: Required |
Version History
Introduced in R2024a
1 All MISRA coding rules and directives are © Copyright The MISRA Consortium Limited 2021.
The MISRA coding standards referenced in the Polyspace® Bug Finder™ documentation are from the following MISRA standards:
MISRA C:2004
MISRA C:2012
MISRA C:2023
MISRA C++:2008
MISRA C++:2023
MISRA and MISRA C are registered trademarks of The MISRA Consortium Limited 2021.