C and C++

C Support

This section describes the current state of CodeSonar support for the various C standards.

All features supported: C89/C90, C99, C11, C17/C18

CodeSonar parses and generates internal representation for all features from these standards.

C89 / C90 ANSI X3.159-1989 / ISO/IEC 9899:1990
C99 ISO/IEC 9899:1999
C11 ISO/IEC 9899:2011
C17/C18 ISO/IEC 9899:2018

C23

CodeSonar supports many features from C23.

Parsed and internal representation (IR) generated
_Static_assert with no message N2265
[[nodiscard]] N2267
[[maybe_unused]] N2270
[[deprecated]] N2334
Attributes N2335,N2554
u8 character constants N2418
[[nodiscard]] with message N2448
Unnamed parameters in function definitions N2480
Labels before declarations and end of blocks N2508
Binary integer constants N2549
__has_c_attribute in preprocessor conditionals N2553
Allow duplicate attributes N2557
Digit separators N2626
#elifdef and #elifndef N2645
[[maybe_unused]] for labels N2662
#warning N2686
[[noreturn]] N2764
__has_include in preprocessor conditionals N2799
Identifier Syntax using Unicode Standard Annex 31 N2836
typeof and typeof_unqual N2927,N2930
New spelling of keywords N2934
Relax requirements for variadic parameter list N2975
__VA_OPT__ N3033
Parsed only
[[fallthrough]] N2408
Not yet supported
IEEE 754 decimal floating-point types N2341
Removal of function definitions without prototype N2432
IEEE 754 interchange and extended types N2601
Type change of u8 string literals N2653
Bit-precise integer types (_BitInt) N2763
Suffixes for bit-precise integer constants N2775
Removal of function declarations without prototype N2841
Empty initializers N2900
Predefined true and false N2935
[[unsequenced]] and [[reproducible]] N2956
Type inference in object definitions N3007
#embed N3017
constexpr objects N3018
Improved Normal Enumerations N3029
Enhancements to Enumerations N3030
Storage-class specifiers for compound literals N3038
nullptr N3042