Compiler Option Descriptions and General Rules

This section includes descriptions of all the current Linux* OS, Mac OS* X, and Windows* OS compiler options. The option names are arranged by functional category, and within each category, the options are listed in alphabetical order.

Option Descriptions

Each option description contains the following information:

Some option descriptions may also have the following:

General Rules for Compiler Options

You cannot combine options with a single dash (Linux OS and Mac OS X) or slash (Windows OS). For example:

All compiler options are case sensitive. Some options have different meanings depending on their case; for example, option "c" prevents linking, but option "C" places comments in preprocessed source output.

Options specified on the command line apply to all files named on the command line.

Options can take arguments in the form of file names, strings, letters, or numbers. If a string includes spaces, the string must be enclosed in quotation marks. For example:

Compiler options can appear in any order.

On Windows systems, all compiler options must precede /link options, if any, on the command line.

Unless you specify certain options, the command line will both compile and link the files you specify.

You can abbreviate some option names, entering as many characters as are needed to uniquely identify the option.

Certain options accept one or more keyword arguments following the option name. For example, the arch option accepts several keywords.

To specify multiple keywords, you typically specify the option multiple times. However, there are exceptions; for example, the following are valid: -axNB (Linux OS) or /QaxNB (Windows OS).

Compiler options remain in effect for the whole compilation unless overridden by a compiler #pragma.

To disable an option, specify the negative form of the option.

On Windows systems, you can also disable one or more options by specifying option /Od last on the command line.

Note iconNote

On Windows systems, the /Od option is part of a mutually-exclusive group of options that includes /Od, /O1, /O2, /O3, and /Ox. The last of any of these options specified on the command line will override the previous options from this group.

If there are enabling and disabling versions of an option on the command line, the last one on the command line takes precedence.

Online Lists and Functional Groupings of Compiler Options

To see a list of all the compiler options online, specify option help on the command line.

To see functional groupings of compiler options, specify a functional category for option help. For example, to see a list of options that affect diagnostic messages displayed by the compiler, enter one of the following commands:

-help diagnostics     ! Linux and Mac OS X systems
/help diagnostics     ! Windows systems

For details on the categories you can specify, see help.


Submit feedback on this help topic

Copyright © 1996-2011, Intel Corporation. All rights reserved.