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.
Target | char | short | int | long | long long | float | double | long double | ptr | Default sign of char | Endianness | Alignment | Definition of wchar_t |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
i386 | 8 | 16 | 32 | 32 | 64 | 32 | 64 | 96 | 32 | signed | Little | 32 | unsigned short |
powerpc | 8 | 16 | 32 | 32 | 64 | 32 | 64 | 64 | 32 | unsigned | Big | 64 | N/A |
powerpc64 | 8 | 16 | 32 | 64 | 64 | 32 | 64 | 64 | 64 | unsigned | Big | 64 | N/A |
arm | 8 | 16 | 32 | 32 | 64 | 32 | 64 | 64 | 32 | unsigned | Big | 64 | unsigned short |
coldfire | 8 | 16 | 32 | 32 | 64 | 32 | 64 | 64 | 32 | signed | Big | 64 | N/A |
mips | 8 | 16 | 32 | 32 | 64 | 32 | 64 | 64 | 32 | signed | Big | 64 | N/A |
mcore | 8 | 16 | 32 | 32 | 64 | 32 | 64 | 64 | 32 | unsigned | Big | 64 | N/A |
rh850 | 8 | 16 | 32 | 32 | 64 | 32 | 64 | 64 | 32 | signed | Little | 32 | unsigned short |
superh | 8 | 16 | 32 | 32 | 64 | 32 | 64 | 64 | 32 | signed | Big | 64 | N/A |
tricore | 8 | 16 | 32 | 32 | 64 | 32 | 64 | 64 | 32 | signed | Little | 64 | unsigned short |
68k ,
sparc | Not 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
.
To override the macro definition, use the option
Preprocessor definitions (-D)
.To undefine a macro, use the option
Disabled preprocessor definitions (-U)
.
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