C/C++ Language Standard Used in Polyspace Analysis
The Polyspace® analysis adheres to a specific language standard for code compilation. The language standard, along with your compiler specification, defines the language elements that you can use in your code. For instance, if the Polyspace analysis uses the C99 standard, C11 features such as use of the thread support library from threads.h causes compilation errors.
Supported Language Standards
The Polyspace analysis supports these standards:
C: C90, C99, C11, C17
The default standard depends on your compiler specification. To change the language standard, use the option
C standard version (-c-version).C++: C++03, C++11, C++14, C++17, C++20
The default standard depends on your compiler specification. To change the language standard, use the option
C++ standard version (-cpp-version).
Default Language Standard
The default language standard depends on your specification for the option Compilation toolchain (Static
analysis).
GCC compilers
| Compiler | C Standard | C++ Standard |
|---|---|---|
gnu3.4, gnu4.6, gnu4.7, gnu4.8, gnu4.9 | C99 | C++03 |
gnu5.x
| C11 | C++03 |
gnu6.x
| C11 | C++14 |
gnu7.x
| C11 | C++14 |
gnu8.x
| C17 | C++14 |
gnu9.x
| C17 | C++14 |
gnu10.x
| C17 | C++14 |
gnu11.x
| C17 | C++17 |
gnu12.x
| C17 | C++17 |
gnu13.x
| C17 | C++17 |
Clang compilers
| Compiler | C Standard | C++ Standard |
|---|---|---|
clang3.x
| C11 | C++03 The analysis accepts some C++11 extensions. |
clang4.x
| C11 | C++03 The analysis accepts C++14 extensions. |
clang5.x
| C11 | C++03 The analysis accepts C++14 extensions. |
clang6.x
| C11 | C++14 |
clang7.x
| C11 | C++14 |
clang8.x
| C11 | C++14 |
clang9.x
| C11 | C++14 |
clang10.x
| C11 | C++14 |
clang11.x
| C17 | C++14 |
clang12.x
| C17 | C++14 |
clang13.x
| C17 | C++14 |
clang14.x
| C17 | C++14 |
clang15.x
| C17 | C++14 |
clang16.x
| C17 | C++17 |
Visual Studio compilers
| Compiler | C Standard | C++ Standard |
|---|---|---|
| C99 | C++03 |
visual14.0
| C99 | C++14 |
visual15.x
| C99 | C++14 |
visual16.x
| C99 | C++14 |
visual17.x
| C99 | C++14 |
Other Compilers
| Compiler | C Standard | C++ Standard |
|---|---|---|
armcc
| C99 | C++03 |
armclang
| C11 | C++03 |
codewarrior
| C99 | C++03 |
cosmic
| C99 | Not supported |
diab
| C99 | C++03 |
generic
| C99 | C++03 |
greenhills
| C99 | C++03 |
iar
| C99 | C++03 |
iar-ew
| C99 | C++03 |
intel
| C99 | C++14 |
keil
| C99 | C++03 |
microchip
| C99 | Not supported |
renesas
| C99 | C++03 |
tasking
| C99 | C++03 |
ti
| C99 | C++03 |
See Also
Compilation toolchain (Static analysis) | C standard version (-c-version) | C++ standard version (-cpp-version)