Main Content

本页翻译不是最新的。点击此处可查看最新英文版本。

目标和编译器

目标处理器类型、编译器行为

要匹配您的运行时环境,请指定目标和编译器选项。分析会使用这些选项来确定变量大小、语言扩展和编译器特定的行为。如果仍然出现编译错误,您可以使用环境设置类别中的选项解决特定错误。

分析选项

全部展开

源代码语言 (-lang)Specify language of source files
C 标准版本 (-c-version)Specify C language standard followed in source code
C++ 标准版本 (-cpp-version)Specify C++ language standard followed in source code

必需

编译器 (-compiler)指定用于编译源代码的编译器
目标处理器类型 (-target)通过选择预定义目标处理器来指定数据类型的大小和端序
通用目标选项Specify size of data types and endianness by creating your own target processor

可选

size_t 的管理 (-size-t-type-is)Specify the underlying data type of size_t
wchar_t 的管理 (-wchar-t-type-is)Specify the underlying data type of wchar_t
块 char16/32_t 类型 (-no-uliterals)Disable Polyspace definitions for char16_t or char32_t
Sfr 类型支持 (-sfr-types)Specify sizes of sfr types for code developed with Keil or IAR compilers
包对齐值 (-pack-alignment-value)Specify default structure packing alignment for code developed in Visual C++
忽略 pragma 包指令 (-ignore-pragma-pack)Ignore #pragma pack directives
除法向下舍入 (-div-round-down)Round down quotients from division or modulus of negative numbers instead of rounding up
枚举类型定义 (-enum-type-definition)指定如何用基类型表示 enum
有符号右移位 (-logical-signed-right-shift)Specify how to treat the sign bit for logical right shifts on signed variables

主题

快速入门

模拟您的编译器

语言标准和扩展