Main Content

Diab Compiler (-compiler diab)

Specify the Wind River Diab compiler

Description

Specify diab for Compiler (-compiler) if you compile your code using the Wind River® Diab compiler. By specifying your compiler, you can avoid compilation errors from syntax that is not part of the Standard but comes from language extensions.

Then, specify your target processor type. If you select diab for Compiler, in the user interface of the Polyspace® desktop products, you see only the processors allowed for the Diab compiler. Your choice of target processor determines the size of fundamental data types, the endianness of the target machine and certain keyword definitions.

If you specify the diab compiler, you must specify the path to your compiler header files. See Provide Standard Library Headers for Polyspace Analysis.

Settings

The targets use the following default sizes in bits for the fundamental types. You do not see these sizes in the user interface of the Polyspace desktop products.

Targetcharshortintlonglong longfloatdoublelong doubleptrDefault sign of charEndiannessAlignmentDefinition of wchar_t
i38681632326432649632signedLittle32unsigned short
powerpc81632326432646432unsignedBig64N/A
powerpc6481632646432646464unsignedBig64N/A
arm81632326432646432unsignedBig64unsigned short
coldfire81632326432646432signedBig64N/A
mips81632326432646432signedBig64N/A
mcore81632326432646432unsignedBig64N/A
rh85081632326432646432signedLittle32unsigned short
superh81632326432646432signedBig64N/A
tricore81632326432646432signedLittle 64unsigned short
68k, sparcNot supported.

In addition, wchar_t is interpreted as unsigned short and size_t is interpreted as unsigned int.

Your compiler specification also determines the values of many compiler-specific macros. In case you want to know how Polyspace defines a specific macro, use the option -dump-preprocessing-info.

Tips

  • Polyspace does not support these Diab compiler features:

    • The preprocessor directives #assert and #unassert. Your code compiles but the software does not interpret these directives semantically.

    • Single-character constants in #if directives having the same value as the same character constant in the execution character set. Your code compiles but Polyspace does not consider that the character constants have the same value.

    • The extended sizeof() syntax using two arguments. For example, sizeof(char, 2). Your code does not compile with Polyspace when you use this feature.

    • Statement expressions. For example, ({int y; y=foo(); y;}). Your code does not compile with Polyspace when you use this feature.

    • The use of regular expressions with the defined preprocessor operator. For example #if defined ("BSP_HW*"). Your code does not compile with Polyspace when you use this feature.

  • If you encounter errors during Polyspace analysis, see Fix Polyspace Compilation Errors Related to Diab Compiler.

  • If you use Polyspace as You Code extensions in IDEs, enter this option in an analysis options file. See options file.

Command-Line Information

Parameter: -compiler diab -target
Value: i386 | powerpc | arm | coldfire | mips | mcore | rh850 | superh | tricore
Default: powerpc
Example (Bug Finder): polyspace-bug-finder -compiler diab -target tricore
Example (Code Prover): polyspace-code-prover -compiler diab -target tricore
Example (Bug Finder Server): polyspace-bug-finder-server -compiler diab -target tricore
Example (Code Prover Server): polyspace-code-prover-server -compiler diab -target tricore

Version History

Introduced in R2016b