Main Content

Target and Compiler

Target processor type, compiler behavior

To match your run-time environment, specify the target and compiler options. The analysis uses these options to determine variable sizes, language extensions and compiler-specific behavior. If you still get compilation errors, you can work around specific errors with options from the Macros and Environment Settings category.

Analysis Options

expand all

Source code language (-lang)Specify language of source files
C standard version (-c-version)Specify C language standard followed in source code
C++ standard version (-cpp-version)Specify C++ language standard followed in source code

Required

Compiler (-compiler)Specify the compiler that you use to build your source code
Target processor type (-target)Specify size of data types and endianness by selecting a predefined target processor
Generic target optionsSpecify size of data types and endianness by creating your own target processor

Optional

Management of size_t (-size-t-type-is)Specify the underlying data type of size_t
Management of wchar_t (-wchar-t-type-is)Specify the underlying data type of wchar_t
Block char16/32_t types (-no-uliterals)Disable Polyspace definitions for char16_t or char32_t
Sfr type support (-sfr-types)Specify sizes of sfr types for code developed with Keil or IAR compilers
Pack alignment value (-pack-alignment-value)Specify default structure packing alignment for code developed in Visual C++
Ignore pragma pack directives (-ignore-pragma-pack)Ignore #pragma pack directives
Division round down (-div-round-down)Round down quotients from division or modulus of negative numbers instead of rounding up
Enum type definition (-enum-type-definition)Specify how to represent an enum with a base type
Signed right shift (-logical-signed-right-shift)Specify how to treat the sign bit for logical right shifts on signed variables

Topics

Getting Started

Specify Polyspace Analysis Options

Specify Polyspace® analysis options in Polyspace user interface, other IDE-s or scripts.

Emulating Your Compiler

Specify Target Environment and Compiler Behavior

Learn the workflow for specifying Target & Compiler options.

Create Polyspace Analysis Configuration from Build Command (Makefile)

Reuse build commands (makefiles) to configure the Polyspace analysis.

Provide Standard Library Headers for Polyspace Analysis

Find paths to C or C++ standard library headers from your compiler and specify the paths in your Polyspace project.

Language Standards and Extensions

C/C++ Language Standard Used in Polyspace Analysis

See supported language standards and the default standard used in Polyspace analysis.

Supported Keil or IAR Language Extensions

Find which Keil or IAR-specific extensions of the C language standard are supported for verification.