JavaScript is not currently enabled, but is required for full CodeSonar manual search and browse functionality.

If you are viewing this file in your hub's Web GUI, enable JavaScript in your browser: you will also need it for GUI functionality.

If you opened this file directly from disk, your browser may be directly suppressing JavaScript functionality: certain browsers perform this suppression on local files (but not files delivered by web servers) for security reasons.

CodeSonar® 9.2p0 CONFIDENTIAL CodeSecure Inc
C and C++

CodeSonar C and C++ Front-end Options

Front-end options affect the parsing of a C or C++ file, but are not normal C flags: they are inserted after the compiler model has translated the C flags specified in the compiler invocation and any additional C flags specified with CFLAGS_PREPEND and CFLAGS_APPEND.



How to Use Front End Options

Set the EDG_FRONTEND_OPTIONS_APPEND or EDG_FRONTEND_OPTIONS_PREPEND attribute in the project configuration file to include the desired front end options and arguments (if any).

The Front End Options

When using the Renesas SuperH RISC engine family compiler model with DSP-C enabled, define a named address space called name (optionally, that lies within the space named parent_name).
[C++17 only] Enable or disable calling special allocation and deallocation functions for types with more stringent alignment requirements than the basic types.
Enable or disable recognition of alternative tokens. This controls recognition of the digraph tokens in C and C++.
Enables the ARM assembly code extension.
Control whether ASM functions are allowed. Examples of ASM functions are
asm void f(int a, int b) { }
__asm void g(int a, int b) { }

ASM functions are parsed but ignored. Their bodies are represented by a single program point of kind unavailable. The scope of an ASM function is local to the file. By default, ASM functions are not allowed.

[C++ only] Enable or disable auto as a type specifier. Enabling auto as a type specifier will disable it as a storage class specifier.
[C++ only] Enable or disable recognition of bool.
Enable or disable a mode in which a shorter form of the diagnostic output is used. When enabled, the original source line is not displayed and the error message text is not wrapped when too long to fit on a single line. The mode is disabled by default.
Explicitly disable all C++11 features (although individual features can be enabled on the command line). Enable C++ mode.
Enable or disable C++11 extensions.
Enable or disable template deduction in the style dictated by the C++11 standard. (SFINAE: Substitution Failure Is Not An Error)
When front end option --c++11 or --c++11_sfinae is specified, controls the handling of access errors.

If neither --c++11 nor --c++11_sfinae is specified, these options have no effect.

Enable C++14 extensions. Cannot be used with options enabling/requiring a C mode.
Enable C++17 extensions. Cannot be used with options enabling/requiring a C mode.
Enable C++20 extensions. Cannot be used with options enabling/requiring a C mode.
[Microsoft C++ only] Enable compilation of C++/CLI source.
Enable compilation of C rather than C++.
Enable compilation of C rather than C++, specify the C89 version of C.
Enable compilation of C rather than C++, specify the C99 version of C.
Enable C11 extensions. Cannot be used with options enabling/requiring a C++ mode.
Enable C18 extensions. Cannot be used with options enabling/requiring a C++ mode.
[C++ only] Enable compatibility with the AT&T C++ Language System (cfront) release 3.0; also enable acceptance of anachronisms.
Enable/disable Clang C or C++ language compatibility features (including GNU language compatiblility features).
Specifies the Clang compiler version to emulate. Version x.y.z of the Clang compiler is encoded as x*10000+y*100+z.
Keep comments in preprocessed code.
Enable or disable support for compound literals.
Control whether C++ string literals and wide string literals are const (as required by the standard) or non-const (as was true in earlier versions of the C++ language).
Set the context limit to number. The context limit is the maximum number of template instantiation context entries to be displayed as part of a diagnostic message. If the number of context entries exceeds the limit, the first and last N context entries are displayed, where N is half of the context limit. A value of zero is used to indicate that there is no limit.
Allow empty braced initializers {}.
Allow Clang-style feature-test macros.
Allow braced initializers {...} for flexible array members. Zero-length arrays are permitted.
Specifies that certain implicit conversions between incompatible vector types should be accepted.
Specifies that anonymous structs and unions should be accepted.
[C++ only] Enable/disable the use of the alignas specifier.
Enable/disable Apple-specific Clang C or C++ language compatibility features.
Enable Arm Compiler C or C++ language compatibility features.
Enable the builtin type __builtin_va_list.
Enable recognition of the C11 _Atomic keyword.
[C++ only] Allow capture of *this in lambda expressions.
Enable GNU case ranges.
Enable/disable recognition of the char16_t and char32_t keywords.
[C++ only] Enable/disable the use of the constexpr specifier.
[C++ only] Allow the use of if constexpr(condition) to create if statements whose condition is evaluated as a compile-time constant.
[C++ only] Allow the use of lambdas inside constexpr declarations.
[For use with Microsoft Visual Studio only] Specifies that one of the results of the compilation will be a precompiled header (PCH).

The generated PCH file will contain information about the compilation from the start of the top level source file up to and including header stop location, which is determined as follows.

The name of the precompiled header file will be determined as follows.

[For use with Microsoft Visual Studio only] When --cs_create_pch is specified, specifies the name of the header file location at which precompilation stops. Precompilation proceeds from the start of the top level source file up to and including the (first) inclusion of stopfilename, even if occurrences of #pragma hdrstop are encountered.

When --cs_create_pch is not specified this option has no effect.

Adds framework directory dir to the list of system include directories.
Adds framework directory dir to the list of include directories.
Enable/Disable the use of the __declspec attribute.
[C++ only] Enable/disable the use of the decltype specifier.
[C++ only] Allow the use of decltype(auto) as a placeholder type specifier. The deduced type will be decltype(expr) where expr is the initializer. For example:
auto c0 = a;             // type of c0 is int, holding a copy of a
decltype(auto) c1 = a;   // type of c1 is int, holding a copy of a
decltype(auto) c2 = (a); // type of c2 is int&, an alias of a
Defines macros __EDG__ and __EDG_VERSION__.
[C++ only] Allow disabling of member functions via the use of the delete operator.
[C++ only] Allow the use of scoped enumeration types (enum classes).
[C++ only] Allow the specification of a base type for enums. For example:
enum E: signed char { e1 = -1, e2 = 1 };
[C++ only] Allow the explicit specifier to be applied to user-defined conversion functions.
Allows struct variables to be declared without names and their fields accessed directly.
struct {
   int field;
};
void test(void) {
   field = 7;
} 
Allows code that includes the #asm...#endasm construct, as in the following example.
#asm
    movl %esp, %ebp
#endasm
Allows code to specify the address at which a variable is to be stored using @.
int x @ 0x1234;
Note: A variable that is declared with both an at-addresses and an initialization will cause a parse error.
Allows code that specifies numbers in binary notation using 0b or 0B.
int x = 0b101; /* x == 5 */
[C90] Permits variable declarations in the first ("initialization") clause of a for loop header, as in C99 and C++.
for( int i = 0; i < 15; ++i ) 
    /* ... */
Conversions between incompatible pointer types will cause warnings rather than errors.
void foo(int *ip);
void bar() {
    double d;
    foo(&d); /* compiler warning (not error) here */
}
Allows code to contain a declaration after a statement in a block (forbidden in ANSI/ISO C before C99).
int i;        /* declaration */
i = myint();  /* statement */
int j;        /* declaration after a statement */
Instructs the preprocessor to treat all directives of the form
#include "A"
/* or */
#include <A>
as if they read
#include "B"
/* or */
#include <B>
/* (respectively) */
Allows code that uses enum types that have been declared but not defined, as in the following example.
typedef enum A A_t;
A_t a;

enum X;
enum X y;

int main() {
    a = 0;
    y = 7;
    return 0;
}
Enable support for OpenMP pragmas, such as #pragma omp parallel.
Allows code that contains assembly statements delimited by #pragma asm ... #pragma endasm
int main() {
#pragma asm
    movl %esp, %ebp
#pragma endasm
    return 0;
}          
Allows code that declares arrays of size zero, as in the following example.
struct S {
    int field[0]; 
};

int var[0];

int main() {
    sizeof(struct S);  /* 4 */
    sizeof(var);       /* 0 */
}
[C++ only] Allow explicit instantiation declarations of class templates (extern templates).
Allow the use of false as a null pointer constant.
Allows the use of C99 flexible array members in structs. For example:
struct vectord {
   size_t len;
   double arr[]; // the flexible array member must be last
};
Accept C++17 fold expressions.
Accept the subset of GNU-style extended asm that does not include qualifiers volatile or goto.
Enables support for the GNU __attribute__ C extension.
Enable IAR C or C++ language compatibility features.
Enable/disable in-class specializations.
Enables the #import directive.

This option is available for the dcc (all versions) and gcc (version 3.0 and higher) compiler models. (Do not use with the cl model: the #import directive that this enables is different to the one in cl.)

[C++ only] Allow the use of C++11 inline namespaces.
[C++ only] Allow the inline specifier to be applied to variable declarations.
[C++ only] Allow the initialization of objects with a braced initializer list.
[C++ only] Allow local and unnamed types to be used as template arguments.
Informs CodeSonar that the compilation should be associated with ABI key K.

This option is provided for use by custom compiler models. If you want to specify an ABI key to the front end through EDG_FRONTEND_OPTIONS_APPEND or EDG_FRONTEND_OPTIONS_PREPEND, use --cs_user_abi_key.

Note that specifying --cs_model_abi_key K does not cause CodeSonar to generate or use a project-compiler configuration file whose name includes K. Only ABI keys specified with COMPILER_MODELS rules have this effect.

For more information, see Compiler Models: ABI Keys.

Enable Microsoft-style ASM syntax.
[C++ only] Allow the use of attributes for namespaces.
[C++ only] Enable/disable recognition of the noexcept keyword.
--cs_pch_name filepath
[For use with Microsoft Visual Studio only] Specifies the pathname of the precompiled header to use when --cs_create_pch or --cs_use_pch is specified.

filepath should be a path to a file (not a path to a directory).

[C++ only] Allow range-based for loops.
[C++ only] Allow the use of rvalue references for *this.
[C++ only] Relax a number of restrictions on constexpr functions, as follows.
[C++ only] Allow the beginning and end types of a range-based for loop to be different types.
[C++ only] Accept pointer-to-member expressions where the object is an rvalue and the pointer to member is const&-qualified. For example:
struct X { void myfunc() const&; };
(X{}.*&X::myfunc)();
[C++ only] Accept if and switch statements with a separate initializer. For example:
status_code f() {
    if (status_code c = g(); c != SUCCESS) {
        return c;
    }
    // ...
}
Enables support for sized integer types __int8, __int16, __int32, __int64.
[C++ only] Enable/disable the C++11 static_assert keyword.
Accept C++17 structured bindings.
Specifies the default alignment of a double, in bytes. Equivalent to configuration parameter setting CS_TARG_ALIGNOF_DOUBLE=n.

If --cs_targ_alignof_double is specified and CS_TARG_ALIGNOF_DOUBLE is set, --cs_targ_alignof_double takes precedence.

Specifies the default alignment of a long double, in bytes. Equivalent to configuration parameter setting CS_TARG_ALIGNOF_LONG_DOUBLE=n.

If --cs_targ_alignof_long_double is specified and CS_TARG_ALIGNOF_LONG_DOUBLE is set, --cs_targ_alignof_long_double takes precedence.

Specifies the default alignment for fields of type double, in bytes. This could be different from the intrinsic alignment of double. Equivalent to configuration parameter setting CS_TARG_DOUBLE_FIELD_ALIGNMENT=n.

If --cs_targ_double_field_alignment is specified and CS_TARG_DOUBLE_FIELD_ALIGNMENT is set, --cs_targ_double_field_alignment takes precedence.

Specifies the default alignment for fields of type long double, in bytes. This could be different from the intrinsic alignment of long double. Equivalent to configuration parameter setting CS_TARG_DOUBLE_FIELD_ALIGNMENT=n.

If --cs_targ_long_double_field_alignment is specified and CS_TARG_LONG_DOUBLE_FIELD_ALIGNMENT is set, --cs_targ_long_double_field_alignment takes precedence.

Specifies that 'plain' int bit fields should be treated as signed. Equivalent to configuration parameter setting CS_TARG_PLAIN_INT_BIT_FIELD_IS_UNSIGNED=No.

If --cs_targ_plain_int_bit_field_is_signed is specified and CS_TARG_PLAIN_INT_BIT_FIELD_IS_UNSIGNED is set, --cs_targ_plain_int_bit_field_is_signed takes precedence.

Specifies that 'plain' int bit fields should be treated as unsigned. Equivalent to configuration parameter setting CS_TARG_PLAIN_INT_BIT_FIELD_IS_UNSIGNED=Yes.

If --cs_targ_plain_int_bit_field_is_unsigned is specified and CS_TARG_PLAIN_INT_BIT_FIELD_IS_UNSIGNED is set, --cs_targ_plain_int_bit_field_is_unsigned takes precedence.

Specifies the size of a double, in bytes. Equivalent to configuration parameter setting CS_TARG_SIZEOF_DOUBLE=n.

If --cs_targ_sizeof_double is specified and CS_TARG_SIZEOF_DOUBLE is set, --cs_targ_sizeof_double takes precedence.

Specifies the size of a long double, in bytes. Equivalent to configuration parameter setting CS_TARG_SIZEOF_LONG_DOUBLE=n.

If --cs_targ_sizeof_long_double is specified and CS_TARG_SIZEOF_LONG_DOUBLE is set, --cs_targ_sizeof_long_double takes precedence.

Specifies the integer kind associated with wchar_t. Equivalent to configuration parameter setting CS_TARG_WCHAR_T_INT_KIND=k. See the CS_TARG_WCHAR_T_INT_KIND documentation for the available values for k.

If --cs_targ_wchar_t_int_kind is specified and CS_TARG_WCHAR_T_INT_KIND is set, --cs_targ_wchar_t_int_kind takes precedence.

Enable the use of the decltype specifier using the alternate keyword __decltype.
[C++ and C99 only] Allows universal character names \uNNNN and \UNNNNNNNN (for hexadecimal NNNN and NNNNNNNN).
[For use with Microsoft Visual Studio only] Specifies that the compilation should use a precompiled header (PCH) file generated by --cs_create_pch.

Use of the precompiled data stops and typical compilation continues immediately after the header stop location, which is determined as follows.

The PCH file to use is determined as follows.

[For use with Microsoft Visual Studio only] When --cs_use_pch is specified, specifies the name of the header file location at which use of the precompiled header stops. Use of the precompiled data stops and typical compilation continues immediately after the (first) inclusion of stopfilename, even if occurrences of #pragma hdrstop are encountered.

When --cs_use_pch is not specified this option has no effect.

Informs CodeSonar that the compilation should be associated with ABI key K. This takes precedence over the value specified by --cs_model_abi_key (if any).

This option is provided for use with the EDG_FRONTEND_OPTIONS_APPEND and EDG_FRONTEND_OPTIONS_PREPEND options. If you are writing a custom compiler model and want it to specify an ABI key to the front end, use --cs_model_abi_key.

Note that specifying --cs_user_abi_key K does not cause CodeSonar to generate or use a project-compiler configuration file whose name includes K. Only ABI keys specified with COMPILER_MODELS rules have this effect.

For more information, see Compiler Models: ABI Keys.

[C++ only] Allow standard attribute lists to include the"using" prefix for a standard attribute list. For example:
[[ using gnu: noreturn, deprecated ]] void f() { while(1); }
[C++ only] Accept C++14 variable templates. For example:
template <typename T> T x = 1;
int main() {
    return x<int> + x<double>;
}
Accept C++17 variadic using-declarations.
Define macro name as def. If = def is omitted, define name as 1. Function-style macros can be defined by appending a macro parameter list to name. There are no macro names defined by default (except for __LINE__ and similar language-mandated macros).

If def contains spaces, enclose it in double quotes.

Specifies whether or not tentative definitions will be placed in common storage.
[Microsoft only] Specifies the calling convention to use for functions that are not explicitly declared with one.
Do preprocessing only. Instead of the normal preprocessing output, generate on the preprocessing output file a list of dependency lines suitable for input to the make program.
Enable or disable support for designators.
Override the normal error severity of the specified diagnostic messages. The message(s) may be specified using a mnemonic error tag or using an error number (see --display_error_number).
Display the error message number in any diagnostic messages that are generated. The option may be used to determine the error number to be used when overriding the severity of a diagnostic message.
Accept dollar signs in identifiers.
[C only] Enable/disable support for all Embedded C language extensions.
Enable the diagnosis of noncompliance with the “Embedded C++” subset.
Set the error limit to number. The front end will abandon compilation after this number of errors (remarks and warnings are not counted toward the limit). By default, the limit is 100.
Redirect the output that would normally go to stderr (i.e., diagnostic messages) to the file efile. This option is useful on systems where output redirection of files is not well supported. If used, this option should probably be specified first in the command line, since otherwise any command-line errors for options preceding --error_output would be written to stderr before redirection.
[C++ only] Enable or disable support for exceptions. -x is equivalent to --exceptions.
Enable or disable support for extended designators, an extension to emulate the behavior of certain other C compilers when it comes to designators in aggregate initializers.
Enable or disable support for extended variadic macros, an extension that emulates the behavior of certain other C compilers when it comes to variadic macros.
Enable or disable GNU C++ language compatibility features. This option also specifies that the source language being compiled is C++.
Enable or disable GNU C language compatibility features. This option also specifies that the source language being compiled is C.
[C99 only] Use the GNU C89 semantics of inline.
The version of the GNU compiler that should be emulated in any of the GNU (C or C++) modes. Version x.y.z of the GNU compiler is encoded as x*10000+y*100+z.
Define macro name as def. If =def is omitted, define name as 1. Function-style macros can be defined by appending a macro parameter list to name. Once a macro name is hard defined, all its subsequent definitions or undefinitions are ignored. These are processed together with --define_macro.

If def contains spaces, enclose it in double quotes.

When warnings are enabled and option --warn_redef_after_hard_define is specified in the command line, a warning is issued each time a definition or undefinition is ignored.

Remove any initial definition of the macro name. Once a macro name is hard undefined, all its subsequent definitions or undefinitions are ignored. These are processed together with --undefine_macro, after all --define_macro options and --hard_define_macro options in the command line have been processed.

When warnings are enabled and the option --warn_redef_after_hard_define is specified in the command line, a warning is issued each time a definition or undefinition is ignored.

Instructs the Hi-Tech compiler model not to treat kword as a keyword. If this option is used with other compiler models, or if kword is not one of the keywords specific to the Hi-Tech compiler model, it will be ignored. (See the Hi-Tech compiler model additional keyword list)

This option is provided because the Hi-Tech compiler does not implement all additional keywords for all chips, and programmers in some environments might therefore use identifiers that in other environments would be interpreted as keywords.

Specifies "strict" mode for the Hi-Tech compiler model:

If this option is used with other compiler models it will be ignored.

Enable a g++ compatibility feature that makes the std namespace a synonym for the global namespace.

This option is useful if you see the error namespace "std" has no member ...

Specify the directory in which the files to be included by #import directives are to be found. These files must have been generated previously by the Microsoft compiler. This option is valid only in Microsoft mode.
Specifies the list of suffixes to be used when searching for an include file whose name was specified without a suffix. The argument is a colon-separated list of suffixes (e.g., h:hpp:: ). If a null suffix is to be allowed, it must be included in the suffix list. The default value is :h:hpp:.
Add dir to the list of directories searched for #include files.

--sys_include specifies a system include directory

Control instantiation of external template entities. External template entities are external (i.e., noninline and nonstatic) template functions and template static data members. The instantiation mode determines the template entities for which code should be generated based on the template definition):
none Instantiate no template entities. This is the default.
used Instantiate only the template entities that are used in this compilation.
all Instantiate all template entities whether or not they are used.
local Instantiate only the template entities that are used in this compilation, and force those entities to be local to this compilation.
Enable/disable reflecting the presence of top-levelrestrict parameter type qualifiers in mangled function names.
Select the way that tie-breakers (e.g., cv-qualifier differences) apply in overload resolution. In early tie-breaker processing, the tie-breakers are considered at the same time as other measures of the goodness of the match of an argument value and the corresponding parameter type (this is the standard approach). In late tiebreaker processing, tie-breakers are ignored during the initial comparison, and considered only if two functions are otherwise equally good on all arguments; the tie-breakers can then be used to choose one function over another.
Generate raw listing information in the file lfile. This information is likely to be used to generate a formatted listing. The raw listing file contains raw source lines, information on transitions into and out of include files, and diagnostics generated by the front end. Each line of the listing file begins with a key character that identifies the type of line, as follows:
N a normal line of source; the rest of the line is the text of the line.
X the expanded form of a normal line of source; the rest of the line is the text of the line. This line appears following the N line, and only if the line contains non-trivial modifications (comments are considered trivial modifications; macro expansions, line splices, and trigraphs are considered non-trivial modifications). Comments are replaced by a single space in the expanded-form line.
S a line of source skipped by an #if or the like; the rest of the line is text. Note that the #else, #elif, or #endif that ends a skip is marked with an N.
L an indication of a change in source position. The line has a format similar to the # line-identifying directive output by cpp, that is to say
L line-number "file-name" key
where key is 1 for entry into an include file, 2 for exit from an include file, and omitted otherwise. The first line in the raw listing file is always an L line identifying the primary input file. L lines are also output for #line directives (key is omitted). L lines indicate the source position of the following source line in the raw listing file.
R, W, E, or C an indication of a diagnostic (R for remark, W for warning, E for error, and C for catastrophic error). The line has the form
S "file-name" line-number column-number message-text
where S is R, W, E, or C, as explained above. Errors at the end of file indicate the last line of the primary source file and a column number of zero. Command-line errors are catastrophes with an empty file name ("") and a line and column number of zero. Internal errors are catastrophes with position information as usual, and message-text beginning with (internal error). When a diagnostic displays a list (e.g., all the contending routines when there is ambiguity on an overloaded call), the initial diagnostic line is followed by one or more lines with the same overall format (code letter, file name, line number, column number, and message text), but in which the code letter is the lower case version of the code letter in the initial line. The source position in such lines is the same as that in the corresponding initial line.
Permit the use of long long in strict mode in dialects in which it is non-standard.
Enable or disable the K&R usual arithmetic conversion rules with respect to long. This means the rules of K&R I, Appendix A, 6.6, not the rules used by the pcc compiler. The significant difference is in the handling of long op unsigned int when int and long are the same size. The ANSI/ISO/pcc rules say the result is unsigned long, but K&R I says the result is long (unsigned long did not exist in K&R I).
Enable or disable recognition of Microsoft extensions. When Microsoft extensions are recognized, language features that are not recognized by the Microsoft compiler are disabled by default.
Enable or disable recognition of certain Microsoft bugs. These options also enable Microsoft mode. Microsoft bugs mode is disabled by default.
The "build number" of the Microsoft compiler that should be emulated in Microsoft mode. This option also enables Microsoft mode.
The version of the Microsoft compiler that should be emulated in Microsoft mode. This enables or disables particular Microsoft mode features when the acceptance of those features varies between versions of the Microsoft compiler. The value specified is the value of the predefined macro _MSC_VER supplied by the version of the Microsoft compiler to be emulated. For example, 1100 is the value that corresponds to Visual C++ version 5.0. This option also enables Microsoft mode.
Emulate the Microsoft Visual Studio /await command-line switch that enables a pre-C++20 version of coroutines.
Emulate the Microsoft Visual Studio /std:c11 command-line switch by enabling the same set of C11 options that are supported by the Visual Studio version that corresponds to the value of microsoft_version. If not specified explicitly with the --microsoft_version command-line option, microsoft_version is set to the value of the DEFAULT_MICROSOFT_VERSION. microsoft_version must have a value of at least 1927 for this option to have an effect.
Emulate the Microsoft Visual Studio /std:c17 command-line switch by enabling the same set of C17 options that are supported by the Visual Studio version that corresponds to the value of microsoft_version. If not specified explicitly with the --microsoft_version command-line option, microsoft_version is set to the value of the DEFAULT_MICROSOFT_VERSION. microsoft_version must have a value of at least 1928 for this option to have an effect.
Enables the same set of C++14 options that are supported by the Visual Studio version that corresponds to the value specified by front end option --microsoft_version (including the case where a compiler model specifies --microsoft_version in response to a command line option or ABI key), or by the value of the DEFAULT_MICROSOFT_VERSION macro if --microsoft_version is not specified. microsoft_version must have a value of at least 1903 for this option to have an effect.
Enables the same set of C++17 options that are supported by the Visual Studio version that corresponds to the value specified by front end option --microsoft_version (including the case where a compiler model specifies --microsoft_version in response to a command line option or ABI key), or by the value of the DEFAULT_MICROSOFT_VERSION macro if --microsoft_version is not specified. microsoft_version must have a value of at least 1911 for this option to have an effect.
Enables the same set of C++20 options that are supported by the Visual Studio version that corresponds to the value specified by front end option --microsoft_version (including the case where a compiler model specifies --microsoft_version in response to a command line option or ABI key), or by the value of the DEFAULT_MICROSOFT_VERSION macro if --microsoft_version is not specified. microsoft_version must have a value of at least 1920 for this option to have an effect.
Enables the same set of C++ options that are supported by the Visual Studio version that corresponds to the value specified by front end option --microsoft_version (including the case where a compiler model specifies --microsoft_version in response to a command line option or ABI key), or by the value of the DEFAULT_MICROSOFT_VERSION macro if --microsoft_version is not specified.
Enable or disable the set of Microsoft extensions corresponding to the Clang -fms-compatibility option. Can be combined with non-Microsoft emulation modes. Microsoft version is set to the value specified by front end option --microsoft_version (including the case where a compiler model specifies --microsoft_version in response to a command line option or ABI key), or by the value of the DEFAULT_MICROSOFT_VERSION macro if --microsoft_version is not specified.
Enable or disable the set of Microsoft extensions corresponding to the Clang -fms-extensions option. Can be combined with non-Microsoft emulation modes. Microsoft version is set to the value specified by front end option --microsoft_version (including the case where a compiler model specifies --microsoft_version in response to a command line option or ABI key), or by the value of the DEFAULT_MICROSOFT_VERSION macro if --microsoft_version is not specified.
Emulate Microsoft Visual Studio command line options /Zc:__cplusplus and /Zc:__cplusplus-, respectively. Implicitly enables Microsoft emulation mode.
Enable or disable a mode in which the behavior of the preprocessor in Microsoft emulation mode conforms with the C and C++ Standards; when disabled, the preprocessor emulates the behavior of the traditional Microsoft preprocessor.
Enable or disable strict standard-conforming behavior of the conditional ternary operator (?:) in Microsoft mode.
Enable or disable processing for multibyte characters in comments, string literals, and character constants.
[C++ only] Use "new" scoping rules for declarations in a for-init statement: the for statement has its own implicit scope.
Do not run code-generation back end.
Suppress warnings on local automatic variables that are used before their values are set. The front end's algorithm for detecting such uses is conservative and is likely to miss some cases that an optimizer with sophisticated flow analysis could detect; thus, an implementation might choose to suppress the warnings from the front end when optimization has been requested but to permit them when the optimizer is not being run.
Suppress warnings. Errors are still issued.
[C++ only] Enable or disable support for the C++11 nullptr keyword.
[C++ only] Use "old" scoping rules for declarations in a for-init statement: the declaration belongs to the scope to which the for statement belongs.
Enable K&R/pcc mode.
If specified, functions declared with both extern and inline will be compiled on their own in addition to being used for inlining.

Otherwise, the function body will only be used to generate inlined code and no representation of the function itself will be compiled.

Specify the output file of the compilation, i.e., the preprocessing or intermediate language output file.
Set the default alignment for packing classes and structs to n, a power-of-2 value within the range 1 to 16. The argument n is the default maximum alignment for nonstatic data members; it can be overridden by a #pragma pack directive.
Specify that at most n instantiations of a given template may be in process of being instantiated at a time. Set to 0 for no limit. The default value is 128.
Act as if each compilation unit has #include <header-file> before its first line.
--preusing fname
[Microsoft C++ only] Act as if each compilation unit specifies #using fname.
Issue remarks, which are diagnostic messages even milder than warnings.
Enable or disable recognition of the restrict keyword.
[C++ only] Enable or disable support for runtime type information: the dynamic_cast and typeid operators.
[C++ only] Enable or disable support for rvalue references.
[GNU C modes only] The default behavior in GNU C modes is not to support short enums.
Make plain char signed. When plain char is signed, the macro __SIGNED_CHARS__ is defined by the front end. On Windows, the default is for them to be signed.
--strict_gnu: emulate the -std=c* behavior of the compiler.
--no_strict_gnu: emulate the -std=gnu* behavior of the compiler.
neither: emulate the -std=c* behavior of the compiler if a --c* or --c++* option is specified, otherwise emulate the -std=gnu* behavior of the compiler.
Enable strict ANSI mode, which provides diagnostic messages when non-ANSI features are used, and disables features that conflict with ANSI C. ANSI violations can be issued as either warnings or errors depending on which command line option is used. The -A and --strict options cause errors to be issued whereas the -a and --strict_warnings options produce warnings. The error threshold is set so that the requested diagnostics will be listed.
Enable/disable recognition of SVR4 C compatibility features; specify that the source language is ANSI C.
Enable/disable the C++11 thread_local specifier (and if so configured, the __thread specifier) to indicate that variables should be stored in threadlocal storage. By default, the __thread specifier is enabled in Sun mode and in GNU mode when gnu_version >= 30400
Allows redeclaration of parameter lists in function prototypes (in ANSI C, this could otherwise cause an error). For example:
int myfunc();
...
int myfunc(float a, float b);
Relaxes type checking when pointers are combined in operations. For type T:

For example:

unsigned int *a;
int *b = a;
const int *c = b;
Generate compilation timing information. This option causes the compiler to display the amount of CPU time and elapsed time used by each phase of the compilation and a total for the entire compilation.
Do preprocessing only. Instead of the normal preprocessing output, generate on the preprocessing output file a list of the names of files #included.
Enable or disable recognition of trigraphs.
Enable or disable recognition of the following.
Remove any initial definition of the macro name. --undefine_macro options are processed after all --define_macro options in the command line have been processed.
--unicode_source_kind {UTF-8,UTF-16,UTF-16LE,UTF-16BE,none}
Source files that do not begin with a byte order mark are assumed to use the Unicode encoding specified (none indicates that the file is not Unicode)
Make plain char unsigned. On Windows, the default is for this type to be signed.
Enable/disable Unified Parallel C extensions.
Enable or disable C++-style "user-defined-literals".
[Microsoft C++ only] Add dir to the list of directories searched for #using files.
Enable or disable support for variadic macros.
[C++ only] Enable or disable support for variadic templates.
[Available only where CPPCX_ENABLING_POSSIBLE is TRUE] Specify the directory dir in which to look for the vcmeta.dll file. By default, searches for vcmeta.dll in the same directory as the module that contains the front end.
Display version numbers and copyright notices for CodeSonar.
Enable or disable support for variable length arrays, an extension that allows the declaration and use of arrays of automatic storage duration with dimensions that are fixed at run time.
Downgrade to warnings errors about differences in exception specifications in declarations. This option is useful if you are getting the error omission of exception specification is incompatible with previous function for functions declared in system include files.
Issue a warning when a macro definition or a macro redefinition is ignored because of a previous hard define or hard undefine.
[C++ only] Enable or disable recognition of wchar_t as a keyword.
Enable or disable a mode in which the error message text is not wrapped when too long to fit on a single line. The mode is enabled by default.
Generate cross-reference information in the file xfile. For each reference to an identifier in the source program, a line of the form
symbol-id name ref-code file-name line-number column-number
is written, where
ref-code is one of the following:
D definition,
d declaration (that is, a declaration that is not a definition),
M modification,
A address taken,
U used,
C changed (that is, used and modified in a single operation, such as an increment)
R any other kind of reference,
E an error in which the kind of reference is indeterminate.
symbol-id is a unique decimal number for the symbol.
The fields of the line are separated by tab characters.
 

To report problems with this documentation, please visit https://support.codesecure.com/.