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 theMacrosandEnvironment Settingscategory.

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 options Specify 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 ofsize_t
Management of wchar_t (-wchar-t-type-is) Specify the underlying data type ofwchar_t
Block char16/32_t types (-no-uliterals) Disable Polyspace definitions forchar16_torchar32_t
Sfr type support (-sfr-types) Specify sizes ofsfrtypes for code developed with Keil or IAR compilers
Pack alignment value (-pack-alignment-value) Specify default structure packing alignment for code developed inVisual C++
Ignore pragma pack directives (-ignore-pragma-pack) Ignore#pragma packdirectives
Division round down (-div-round-down) 商从部门或n模量egative numbers instead of rounding up
Enum type definition (-enum-type-definition) Specify how to represent anenumwith 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

开始

Emulating Your Compiler

Language Standards and Extensions