-no-uliterals
Disable Polyspace definitions for char16_t or char32_t
Description
Specify that the analysis must not define char16_t or char32_t types.
Set Option
Set the option using one of these methods:
Polyspace Platform user interface (desktop products only): This option is not available in a Polyspace® Platform project. If required, specify the command-line version of the option as an advanced option. For more information on how to specify advanced options in the user interface, see
Other.Command line and options file: Use the option
-no-uliterals. See Command-Line Information.
Why Use This Option
If your compiler defines char16_t and/or char32_t through a typedef statement or by using includes, use this option to turn off the standard Polyspace definition of char16_t and char32_t.
To check if your compiler defines these types, save the following code in a C++ file and compile this code using the compiler settings that you typically use:
typedef unsigned short char16_t; typedef unsigned long char32_t;
See if there is a compilation error.
If the file fails to compile with an error such as
redeclaration of C++ built-in type, it means that your compiler has the typeschar16_tandchar32_tdefined as built-in types. Enable this Polyspace option to emulate your compiler behavior.If the file compiles, it means that your compiler defines these types through
typedef-s in includes. If you have already added those includes to your project, you do not need to enable this Polyspace option.
Settings
OnThe analysis does not allow
char16_tandchar32_ttypes.
Off (default)The analysis allows
char16_tandchar32_ttypes.
Dependencies
You can select this option only when these conditions are true:
Source code language (-lang)is set toCPPorC-CPP.Compilation toolchain (Static analysis)is set togenericor agnuversion.
Command-Line Information
Parameter:
-no-uliterals |
| Default: off |
Example (Bug Finder):
polyspace-bug-finder -lang cpp -compiler gnu4.7 -cpp-version cpp11 -no-uliterals |
Example (Code Prover):
polyspace-code-prover -compiler gnu4.7 -lang cpp -cpp-version cpp11 -no-uliterals |
Example (Bug Finder Server):
polyspace-bug-finder-server -lang cpp -compiler gnu4.7 -cpp-version cpp11 -no-uliterals |
Example (Code Prover Server):
polyspace-code-prover-server -compiler gnu4.7 -lang cpp -cpp-version cpp11 -no-uliterals |