Main Content

Management of wchar_t (-wchar-t-type-is)

Specify the underlying data type of wchar_t

Description

Specify the underlying data type of wchar_t explicitly. If you do not specify this option, your choice of compiler determines the underlying type.

Set Option

Set the option using one of these methods:

  • Polyspace® user interface (desktop products only): In your project configuration, select the Target & Compiler node and then select a value for this option.

  • Polyspace Platform user interface (desktop products only): In your project configuration, on the Build tab, select Target & Compiler and then configure the settings for the option Processor. Select a value for the option Type of wchar_t in the Edit Processor dialog. For more information, see Processor Details.

  • Command line and options file: Use the option -wchar-t-type-is. See Command-Line Information.

Why Use This Option

The analysis associates a data type with wchar_t when you specify your compiler. If you use a compiler option that changes this default type, emulate your compiler option by using this analysis option.

Settings

Default: defined-by-compiler

defined-by-compiler

Your specification for Compiler (-compiler) determines the underlying type of wchar_t.

signed-short

The analysis considers signed short as the underlying type of wchar_t.

unsigned-short

The analysis considers unsigned short as the underlying type of wchar_t.

signed-int

The analysis considers signed int as the underlying type of wchar_t.

unsigned-int

The analysis considers unsigned int as the underlying type of wchar_t.

signed-long

The analysis considers signed long as the underlying type of wchar_t.

unsigned-long

The analysis considers unsigned long as the underlying type of wchar_t.

Command-Line Information

Parameter: -wchar-t-type-is
Value: defined-by-compiler | signed-short | unsigned-short | signed-int | unsigned-int | signed-long | unsigned-long
Default: defined-by-compiler
Example (Bug Finder): polyspace-bug-finder -wchar-t-type-is signed-int
Example (Code Prover): polyspace-code-prover -wchar-t-type-is signed-int
Example (Bug Finder Server): polyspace-bug-finder-server -wchar-t-type-is signed-int
Example (Code Prover Server): polyspace-code-prover-server -wchar-t-type-is signed-int