-custom-target
Create a custom target processor with specific data type sizes
Syntax
-custom-target
target_sizes
Description
-custom-target
defines a
custom target processor for the Polyspace® analysis. The target processor definition includes sizes in bytes of fundamental
data types, signedness of plain target_sizes
char
, alignment of structures and
underlying types of standard typedef
-s such as size_t
,
ptrdiff_t
and wchar_t
.
is a comma-separated list
specifying these values. From left to right, the values are the following. If a data type is
not supported, -1 is used for its size.target_sizes
Specification | Possible Values |
---|---|
Whether plain char is signed | true or false |
Size of Other sizes are in bytes. | Number |
Size of short | Number |
Size of int | Number |
Size of short long | Number |
Size of long | Number |
Size of long long | Number |
Size of float | Number |
Size of double | Number |
Size of long double | Number |
Size of pointer | Number |
Minimum alignment of all integer types | Number |
Minimum alignment of variables of type struct or
union | Number |
Endianness | little or big |
Underlying type of size_t | unknown , unsigned_char ,
unsigned_short , unsigned_int ,
unsigned_long , or unsigned_long_long |
Underlying type of ptrdiff_t | unknown , signed_char ,
short , int , long , or
long_long |
Underlying type of wchar_t | unknown , short ,
unsigned_short , int ,
unsigned_int , long , or
unsigned_long |
Typically, this option is used when the polyspace-configure
command
creates an options file for the subsequent Polyspace analysis. However, you can directly enter this option when manually writing
options files. This option is useful in situations where your target specifications are not
covered by one of the predefined target processors. See Target processor
type (-target)
.
If you are running an analysis from the user interface
(Polyspace desktop products only), on the Configuration pane, you can
enter this option in the Other field. See Other
.
Examples
An usage of the option looks like this:
-custom-target false,8,2,4,-1,4,8,4,8,8,4,8,1,little,unsigned_int,int,unsigned_int
Specification | Possible Values |
---|---|
Whether plain char is signed | false |
Size of char | 8 bits |
Size of short | 2 bytes |
Size of int | 4 bytes |
Size of short long | short long is not supported. |
Size of long | 4 bytes |
Size of long long | 8 bytes |
Size of float | 4 bytes |
Size of double | 8 bytes |
Size of long double | 8 bytes |
Size of pointer | 4 bytes |
Maximum alignment of all integer types | 8 bytes |
Maximum alignment of variables of type struct or
union | 1 byte |
Endianness | little |
Underlying type of size_t | unsigned_int |
Underlying type of ptrdiff_t | int |
Underlying type of wchar_t | unsigned_int |
Tips
If your configuration uses both
-custom-target
andTarget processor type (-target)
to specify targets, the analysis uses the target that you specify with-custom-target
.If you use Polyspace as You Code extensions in IDEs, enter this option in an analysis options file. See options file.