Sets the compiler in Strict ANSI mode. Strict ANSI mode is 100% compliant with the ANSI X3.159-1989 standard and does not allow any non-standard constructs.
Sets the compiler in Permissive ANSI compatibility mode. This mode supports the language features of the ANSI X3.159-1989 standard, while allowing certain useful, but non-compliant, constructs in an ANSI C framework.
Sets the length of a line for error messages and warnings to n characters. The default line length is 80. The compiler will break up errors and warnings into multiple lines, inserting a new line and tab between words. If the length of a single word (such as a filename or symbol name) exceeds the maximum line length, then that word will appear alone on a line, but will not be truncated to fit on the line. If the length is set to zero, then errors and warnings will not break into separate lines regardless of their length. Line lengths less than 40 are ignored.
Prints a warning for every asm statement encountered. This is the default.
Prevents the compiler from printing warning messages for asm statements.
Interprets the source code as the C version documented in Kernighan & Ritchie, first edition, and compatible with the portable C compiler (PCC). See also -noansi.
Supports Gnu extensions, such as #import, zero size arrays, compound statements as part of expressions, inline functions and the _ _inline_ _ keyword. This is the default in C. Ignored for C++.
Does not allow Gnu C extensions. This is the default in C++. Ignored for C++.
Allocates enumerated types to the smallest storage possible.
Does not allocate enumerated types to the smallest storage possible.[default]
Specifies the size of the type wchar_t in ANSI C and C++ as 2 bytes.
Specifies the size of type wchar_t in ANSI C and C++ as 4 bytes. [default]
Specifies type char as signed.
Specifies type char as unsigned. [default]
Specifies a bit-field whose type is signed and is interpreted as a signed quantity.
Specifies all bit-fields as an unsigned quantity. This is the default. If the ANSI type declaration signed is used, then that bit-field is signed even if the program is compiled with the -unsignedfield option.
Specifies type wchar_t in ANSI C and C++ as signed. [default]
Specifies type wchar_t in ANSI C and C++ as unsigned.
Specifies pointers and addresses as signed.
Specifies pointers and addresses as unsigned. [default]
Truncates all symbol names to eight characters for compatibility with older UNIX compilers and linkers.
Causes temporary files to be placed in the directory specified by dir instead of /tmp. This is useful if /tmp is on a small file system which might run out of disk space during compiles with inlining or template processing. On Win32, the default temporary directory is the current directory. This is also set with the TMPDIR environment variable. For example:
setenv TMPDIR /usr/tmp
Selects Permissive ANSI compatibility mode. Equivalent to -ansi.
Uses ANSI rules for ++ and *= in K&R C. This is turned off by the -Zansiopeq option.
Selects Strict ANSI compatibility mode. Equivalent to -ANSI.
Allows /* */ as concatenation in K&R C. This option may be turned off with the -Zconcatcomments option.
Allows variables declared, with the extern storage class in a function, to accept initial values. In the K+R mode, this normally gives a warning and in ANSI C mode, it normally is illegal.
Enables a set of extensions to ANSI C used by Japanese automobile manufacturers. This option implies -Xpragma_asm_inline.
Generates a fatal error if a function is referenced or called but no prototype is provided for that function. This is an extension to ANSI C and shows that the prototypes exist for all functions.
Generates a warning if a function is referenced or called but no prototype is provided for that function. This is an extension to ANSI C and shows that the prototypes exist for all functions.
Adds noalias keyword to C. This option may be turned off with the -Znoalias option.
asm inline directive is not recognized. The _ _asm directive is recognized; only the asm directive without leading underscores is affected by this switch. This switch is enabled with -ANSI. See also -[no]asmwarn.
Does not recognize old-fashioned syntax for initializing variables such as int i 5, and for assignment operators such as =+, =-,and =*. -Znooldfashioned turns off this option. If this option is not enabled when compiling in non-ansi mode, the old-fashioned syntax is accepted with a warning message. When compiling in non-ansi mode or using -Xnooldfashioned in K&R mode, old-fashioned initializations give the error:
expected: '=' got: constant
and an equal sign followed by the symbols are recognized as two separate tokens: + - * / % & | ^ << >>. This results in a syntax error for the symbols: + / % | ^ << >> but is correct for the following symbols which are legal unary operators in C: - * &.
For example when not compiling in ANSI mode, -Xnooldfashioned is required to correctly compile the following lines since no space appears after the equal sign:
int i, *p; i =-3; p =&i; i =*p;
By default, this option is disabled.
Enables the following pragmae: #pragma asm, #pragma endasm, and #pragma inline.
Selects a mode of ANSI C compatibility similar to AT&T C Issue 5.0 transition mode supporting function prototypes and the new ANSI keywords signed and volatile in a non-ANSI environment.
Does not use ANSI rules for ++ and *= in K&R C. This option is turned off with the option -Xansiopeq.
Does not allow /* */ as concatenation in K&R C. This option is turned off with the option -Xconcatcomments.
Turns off the -Xnoalias option.
Turns off the -Xnooldfashioned option.
These options control various forms of error checking performed during compilation.
Generates compile-time errors for division by constant zero, overflow of constant expressions, assignment of a constant to a variable where the constant value is outside the range of the variable, passing a constant to a parameter where the constant value is outside the range of the parameter, and constant array index outside of the array bounds.
Provides warnings for unused variables, wrong pragmae, unknown pragmae, and overflow of constant expressions.
Same as -strict=compwarn plus -strict=comperr. Also performs parameter count checking.
Same as -strict=comperr, plus gives an error for any use of a function without an ANSI C prototype.
Same as -strict=compwarn, plus gives a warning for any use of a function without an ANSI C prototype.
Same as -strict, plus gives an error for any use of a function without an ANSI C prototype. Also performs parameter count checking.