Main Content

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. If you do not specify a compiler explicitly, the default analysis uses the C99 standard. 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. If you do not specify a compiler explicitly, the default analysis uses the C++03 standard. 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 Compiler (-compiler).

GCC compilers

CompilerC StandardC++ Standard
gnu3.4, gnu4.6, gnu4.7, gnu4.8, gnu4.9C99C++03
gnu5.xC11C++03
gnu6.xC11C++14
gnu7.xC11C++14
gnu8.xC17C++14
gnu9.xC17C++14
gnu10.xC17C++14
gnu11.xC17C++17
gnu12.xC17C++17

Clang compilers

CompilerC StandardC++ Standard
clang3.xC11

C++03

The analysis accepts some C++11 extensions.

clang4.xC11

C++03

The analysis accepts C++14 extensions.

clang5.xC11

C++03

The analysis accepts C++14 extensions.

clang6.xC11C++14
clang7.xC11C++14
clang8.xC11C++14
clang9.xC11C++14
clang10.xC11C++14
clang11.xC17C++14
clang12.xC17C++14
clang13.xC17C++14

Visual Studio compilers

CompilerC StandardC++ Standard

visual9.0

visual10.0

visual11.0

visual12.0

C99C++03
visual14.0C99C++14
visual15.xC99C++14
visual16.xC99C++14
visual17.xC99C++14

Other Compilers

CompilerC StandardC++ Standard
armccC99C++03
armclangC11C++03
codewarriorC99C++03
cosmicC99Not supported
diabC99C++03
genericC99C++03
greenhillsC99C++03
iarC99C++03
iar-ewC99C++03
intelC99C++14
keilC99C++03
microchipC99Not supported
renesasC99C++03
taskingC99C++03
tiC99C++03

See Also

| |

Related Topics