MISRA C:2012 Rule 1.2
Language extensions should not be used
Description
Rule Definition
Language extensions should not be used.
Rationale
If a program uses language extensions, its portability is reduced. Even if you document the language extensions, the documentation might not describe the behavior in all circumstances.
Polyspace Implementation
The rule checker flags these language extensions, depending on the version of the C standard
used in the analysis. See C standard version
(-c-version)
.
C90:
long long int
type including constantslong double
typeinline
keyword_Bool
keywordshort long int
typeHexadecimal floating-point constants
Universal character names
Designated initializers
Local label declarations
typeof
operatorCasts to union
Compound literals
Statements and declarations in expressions
__func__
predefined identifier_Pragma
preprocessing operatorMacros with variable arguments list
asm
functionsAnonymous unions
Empty
struct
C99:
short long int
typeLocal label declarations
typeof
operatorCasts to union
Statements and declarations in expressions
asm
functionsAnonymous unions
Empty
struct
Troubleshooting
If you expect a rule violation but do not see it, refer to Diagnose Why Coding Standard Violations Do Not Appear as Expected.
Check Information
Group: Standard C Environment |
Category: Advisory |
AGC Category: Advisory |