Some compiler options are only available on certain systems. In the following table, these options are indicated with labels as follows:
Label | Meaning |
---|---|
i32 | Option available on IA-32-based systems |
i32em | Option available on IntelŪ Extended Memory 64 Technology (IntelŪ EM64T) systems |
i64 | Option available on ItaniumŪ-based systems |
Option | Description | Default |
---|---|---|
-A- | Disables all predefined macros. More... |
OFF |
-[no]align (i32 only) |
Analyze and reorder memory layout for variables and arrays. | OFF |
-Aname[(value)] | Associates a symbol name with the specified
sequence of value. Equivalent to an #assert preprocessing directive. More... |
OFF |
-alias_args[-] | This option implies arguments may be aliased [not aliased]. | -alias_args- |
-ansi | Equivalent to GNU* ANSI. | OFF |
-ansi_alias[-] | -ansi_alias directs the compiler to assume that the program adheres to the rules defined in the ISO C Standard. If your program adheres to these rules, then this option will allow the compiler to optimize more aggressively. If it doesn't adhere to these rules, then it can cause the compiler to generate incorrect code. | -ansi_alias- |
-auto_ilp32 | Specifies that the application cannot exceed a 32-bit address space, which allows the compiler to use 32-bit pointers whenever possible. To use this option, you must also specify -ipo[value]. Using the -auto_ilp32 option on programs that can exceed 32-bit address space (2**32) may cause unpredictable results during program execution. This option has no effect on Intel® EM64T systems unless the -axP or -xP option is also used. | OFF |
-ax{K|W|N|B|P} (i32, i32em) |
Generates specialized code for processor-specific codes K,
W, N, B,
and P while also generating generic IA-32 code.
More... |
OFF |
-C | Places comments in preprocessed source output. More... |
OFF |
-c | Stops the compilation process after an object file has been generated.
The compiler generates an object file for each C or C++ source file or
preprocessed source file. Also takes an assembler file and invokes the
assembler to generate an object file. More... |
OFF |
-c99[-] | Enables [disables] C99 support for C programs. More... |
OFF |
-complex_limited_range[-] | Enables the use of "delete basic algebraic expansions" of some arithmetic operations involving data of type _Complex. This can cause some performance improvements in programs that use _Complex arithmetic, but values at the extremes of the exponent range may not compute correctly. Default is -complex_limited_range-. | OFF |
-create_pch filename | Manual creation of precompiled header (filename.pchi). | OFF |
-cxxlib-gcc[=GCC-root-dir] | Link using C++ run-time libraries provided with gcc. This option is
ON by default if your gcc version is 3.2, 3.3, or 3.4. Use the optional
argument, =GCC-root-dir, to specify the
top-level location of the gcc binaries and libraries. More... |
OFF |
-cxxlib-icc | Link using C++ run-time libraries provided by Intel. This option is
ON by default if your gcc version is less than 3.2. More... |
OFF |
-debug [no]inline_debug_info | Produces enhanced source position information for inlined code. | OFF |
-debug [no]variable_locations | Produces additional debug information for scalar local variables using a feature of the DWARF object module format known as location lists. | OFF |
-debug extended | Turns on the three -debug options:
|
OFF |
-dM | Output macro definitions in effect after preprocessing (use with -E). | OFF |
-Dname[=value] | Defines a macro name and associates
it with the specified value. Equivalent
to a #define preprocessor directive. More... |
OFF |
-dryrun | Show driver tool commands, but do not execute tools. | OFF |
-dynamic-linkerfilename | Selects a dynamic linker (filename) other than the default. | OFF |
-E | Stops the compilation process after the C or C++ source files have
been preprocessed, and writes the results to stdout. More... |
OFF |
-EP | Preprocess to stdout omitting #line directives. More... |
OFF |
-export | Enable recognition of exported templates. Supported in C++ mode only. More... |
OFF |
-export_dir dir | Specifies a directory name for the exported template search path. More... |
OFF |
-falias | Assume aliasing in program. | ON |
-fabi-version=n | Directs the compiler to select a specific ABI implementation. More... |
OFF |
-fast | The -fast option maximizes speed across the
entire program. For Itanium-based systems, -fast
sets -O3, -ipo, and -static. For IA-32 and Intel®
EM64T systems, -fast sets -O3,
-ipo, -static, and -xP. Note that on IA-32 and Intel®
EM64T systems, programs compiled with the -xP
option will detect non-compatible processors and generate an error message
during execution. More... |
OFF |
-fcode-asm | Produce assembly file with optional code annotations. Requires -S. | OFF |
-ffnalias | Assume aliasing within functions. | ON |
-finline-functions | Inline any function at the compiler's discretion. Same as -ip. | OFF |
-fminshared | Compilation is for the main executable. Absolute addressing can be used and non-position independent code generated for symbols that are at least protected. | OFF |
-fno-alias | Assume no aliasing in program. | OFF |
-fno-common | Enables the compiler to treat common variables as if they were defined, allowing the use of gprel addressing of common data variables. | OFF |
-fno-exceptions | The -fno-exceptions option turns off exception handling table generation, resulting in smaller code. Any use of exception handling constructs - try blocks, throw statements will produce an error. Exception specifications are parsed but ignored. A preprocessor symbol __EXCEPTIONS is defined when this option is not used. It is undefined when this option is present. | OFF |
-fno-fnalias | Assume no aliasing within functions, but assume aliasing across calls. | OFF |
-fno-implicit-inline-templates | Do not emit code for implicit instantiations of inline templates. For
C++ only. More... |
OFF |
-fno-implicit-templates | Never emit code for non-inline templates which are instantiated implicitly
(i.e. by use); only emit code for explicit instantiations. For C++ only. More... |
OFF |
-f[no-]rtti (i32 and i64) |
Enable [disable] RTTI support. | -frtti |
-fnsplit[-] | Enables [disables] function splitting. Default is ON with -prof_use. To disable function splitting when you use -prof_use, also specify -fnsplit-. | OFF |
-fp (i32, i32em) |
Disable using the EBP register as general purpose register. More... |
OFF |
-fpic, -fPIC | For IA-32, this option generates position independent code. For Itanium-based systems, this option generates code allowing full symbol preemption. |
OFF |
-fp_port (i32 only) |
Round fp results at assignments and casts. Some speed impact. More... |
OFF |
-fpstkchk (i32 only) |
Generates extra code after every function call to assure the FP stack
is in the expected state. More... |
OFF |
-fr32 (i64 only) |
Use only lower 32 floating-point registers. | OFF |
-fshort-enums | Allocate as many bytes as needed for enumerated types. | OFF |
-fsource-asm | Produce assemblable file with optional code annotations. Requires -S. | OFF |
-fsyntax-only | Same as -syntax. | OFF |
-ftls-model=model | Change thread-local storage model, where model
can be the following:
|
OFF |
-ftz[-] (i32em, i64) |
Flushes denormal results to zero. The option is turned ON with -O3. More... |
OFF |
-funsigned-bitfields | Change default bitfield type to unsigned. | OFF |
-funsigned-char | Change default char type to unsigned. | OFF |
-f[no]verbose-asm | Produce assemblable file with compiler comments. Default: -fverbose-asm |
ON |
-fvisibility-default=file | Space separated symbols listed in the file
argument
will get visibility set to default. More... |
OFF |
-fvisibility-extern=file | Space separated symbols listed in the file
argument
will get visibility set to extern. More... |
OFF |
-fvisibility-hidden=file | Space separated symbols listed in the file
argument
will get visibility set to hidden. More... |
OFF |
-fvisibility-internal=file | Space separated symbols listed in the file
argument
will get visibility set to internal. More... |
OFF |
-fvisibility-protected=file | Space separated symbols listed in the file
argument
will get visibility set to protected. More... |
OFF |
-fvisibility= [extern|default|protected |hidden|internal] |
Global symbols (common and defined data and functions) will get the
visibility attribute given by default. Symbol visibility attributes explicitly
set in the source code or using the symbol visibility attribute file options
will override the -fvisibility setting. More... |
OFF |
-fwritable-strings (i32 only) |
Ensure that string literals are placed in a writable data section. | OFF |
-g | Generates symbolic debugging information in the object code for use
by source-level debuggers. The -g option changes
the default optimization from -O2 to -O0. More... |
OFF |
-g0 (i32 only) |
Disable generation of symbolic debug information. | OFF |
-gcc-name=name | Use this option to specify the location of g++ when compiler cannot
locate gcc C++ libraries. For use with -cxxlib-gcc
configuration. Use this option when referencing a non-standard gcc installation. More... |
OFF |
-gcc-version=nnn | This option provides compatible behavior with gcc, where nnn
indicates the gcc version. More... |
OFF |
-[no-]global-hoist | Enables [disables] hoisting and speculative loads of global variables. | OFF |
-H | Print "include" file order and continue compilation. | OFF |
-help | Prints compiler options summary. | OFF |
-idirafterdir | Add directory (dir) to the second include file search path (after -I). | OFF |
-Idirectory | Specifies an additional directory to search for include files. | OFF |
-i_dynamic | Link Intel provided libraries dynamically. | OFF |
-inline_debug_info | Produces enhanced source position information for inlined code. It also provides enhanced debug information useful for function call traceback. To use this option for debugging, you must also specify -g. | OFF |
-ip | Enables interprocedural optimizations for single file compilation. More... |
OFF |
-IPF_fma[-] (i64 only) |
Enable [disable] the combining of floating-point multiplies and add/subtract
operations. More... |
OFF |
-IPF_fltacc[-] (i64 only) |
Enable [disable] optimizations that affect floating-point accuracy. More... |
OFF |
-IPF_flt_eval_method0 (i64 only) |
Floating-point operands evaluated to the precision indicated by the
program. More... |
OFF |
-IPF_fp_relaxed[-] (i64 only) |
Enable [disable] use of faster but slightly less accurate code sequences
for math functions, such as divide and square root. More... |
OFF |
-IPF_fp_speculationmode (i64 only) |
Enable floating-point speculations with the following mode
conditions:
|
OFF |
-ip_no_inlining | Disables inlining that would result from the -ip
interprocedural optimization, but has no effect on other interprocedural
optimizations. More... |
OFF |
-ip_no_pinlining (i32, i32em) |
Disable partial inlining. Requires -ip or -ipo[value]. | OFF |
-ipo[n] | Enables interprocedural optimizations across files. The optional n argument
controls the maximum number of link-time compilations (or number of object
files) that are spawned. The default for value
is 1 when
value is
not specified. More... |
OFF |
-ipo_c | Generates a multifile object file (ipo_out.o)
that can be used in further link steps. More... |
OFF |
-ipo_obj | Forces the compiler to create real object files when used with -ipo[value]. More... |
OFF |
-ipo_S | Generates a multifile assemblable file named ipo_out.s
that can be used in further link steps. More... |
OFF |
-ipo_separate | Creates one object file for every source file. This option overrides
-ipo[value]. More... |
OFF |
-isystemdir | Add directory dir to the start of the system include path. | OFF |
-ivdep_parallel (i64 only) |
This option indicates there is absolutely no loop-carried memory dependency
in the loop where the IVDEP directive is specified. More... |
OFF |
-Kc++ | Compile all source or unrecognized file types as C++ source files. | OFF |
-kernel (i64 only) |
Generates code for inclusion in the kernel. Prevents generation of speculation as support may not be available when code runs. Suppresses software pipelining. | OFF |
-Knopic, -KNOPIC (i64 only) |
Use fpic instead of this option. | ON for Itanium-based systems OFF for IA-32 |
-KPIC, -Kpic | Use fpic instead of this option. | OFF |
-Ldirectory | Instruct linker to search directory
for libraries. More... |
OFF |
-M | Generates makefile dependency lines for each source file, based on the #include lines found in the source file. | OFF |
-march=cpu (i32 only) |
Generate code excusively for a given cpu.
Values for cpu are:
|
OFF |
-mcpu=cpu | Optimize for a specific cpu. For IA-32,
cpu values are:
For Itanium-based Systems, cpu values are:
|
ON pentium4 on IA-32 itanium2 on Itanium-based Systems |
-MD | Preprocess and compile. Generate output file (.d extension) containing dependency information. | OFF |
-MFfile | Generate makefile dependency information in file. Must specify -M or -MM. | OFF |
-MG | Similar to -M, but treats missing header files as generated files. | OFF |
-MM | Similar to -M, but does not include system header files. | OFF |
-MMD | Similar to -MD, but does not include system header files. | OFF |
-mp | Favors conformance to the ANSI C and IEEE 754 standards for floating-point
arithmetic. More... |
OFF |
-mp1 | Improve floating-point precision (speed impact is less than -mp). More... |
OFF |
-MP | Add a phony target for each dependency. | OFF |
-mrelax (i64 only) |
Pass -relax to the linker. | ON |
-mno-relax (i64 only) |
Do not pass -relax to the linker. | OFF |
-MQtarget | Same as -MT, but quotes special Make characters. | OFF |
-mserialize-volatile (i64 only) |
Impose strict memory access ordering for volatile data object references. | OFF |
-mno-serialize-volatile (i64 only) |
The compiler may suppress both run-time and compile-time memory access ordering for volatile data object references. Specifically, the .rel/.acq completers will not be issued on referencing loads and stores. | OFF |
-MTtarget | Change the default target rule for dependency generation. | OFF |
-nobss_init | Places variables that are initialized with zeroes in the DATA section.
Disables placement of zero-initialized variables in BSS (use DATA). More... |
OFF |
-no_cpprt | Do not link in C++ run-time libraries. | OFF |
-nodefaultlibs | Do not use standard libraries when linking. | |
-no-gcc | Do not predefine the __GNUC__, __GNUC_MINOR__,
and __GNUC_PATCHLEVEL__ macros. More... |
OFF |
-nolib_inline | Disables inline expansion of standard library functions. More... |
OFF |
-nostartfiles | Do not use standard startup files when linking. | OFF |
-nostdinc | Same as -X. | OFF |
-nostdlib | Do not use standard libraries and startup files when linking. | OFF |
-O | Same as -O1 on IA-32. Same as -O2 on Itanium-based systems. | OFF |
-O0 | Disables optimizations. More... |
OFF |
-O1 | Enable optimizations. Optimizes for speed. For Itanium compiler, -O1 turns off software pipelining to reduce code size. More... |
ON (i32) |
-O2 | Same as -O1 on IA-32. Same as -O
on Itanium-based systems. More... |
ON (i64) |
-O3 | Enable -O2 plus more aggressive optimizations
that may increase the compilation time. Impact on performance is application
dependent, some applications may not see a performance improvement. More... |
OFF |
-Obn | Controls the compiler's inline expansion. The amount of inline expansion
performed varies with the value of n as
follows:
|
OFF |
-ofile | Name output file. | OFF |
-openmp | Enables the parallelizer to generate multi-threaded code based on the
OpenMP* directives. The -openmp option works with
both -O0 and any optimization level of -O1,
-O2, and -O3. More... |
OFF |
-openmp_profile | The -openmp_profile option enables analysis
of OpenMP* applications with Thread Profiler, which is required to use
this option. More... |
OFF |
-openmp_report{0|1|2} | Controls the OpenMP parallelizer's diagnostic levels. More... |
OFF |
-openmp_stubs | Enables OpenMP programs to compile in sequential mode. The OpenMP directives are ignored and a stub OpenMP library is linked sequentially. | OFF |
-opt_report | Generates an optimization report directed to stderr, unless -opt_report_file is specified. | OFF |
-opt_report_filefilename | Specifies the filename for the optimization report. It is not necessary to invoke -opt_report when this option is specified. | OFF |
-opt_report_levellevel | Specifies the verbosity level of the
output. Valid level arguments:
|
OFF |
-opt_report_phasename | Specifies the compilation name for which
reports are generated. The option can be used multiple times in the same
compilation to get output from multiple phases. Valid name arguments:
|
OFF |
-opt_report_routinesubstring | Specifies a routine substring. Reports from all routines with names that include substring as part of the name are generated. By default, reports for all routines are generated. | OFF |
-opt_report_help | Displays all possible settings for -opt_report_phase. No compilation is performed. | OFF |
-Os | Enable speed optimizations, but disable some optimizations which increase code size for small speed benefit. | OFF |
-p | Same as -qp. | OFF |
-P, -F | Stops the compilation process after C or C++ source files have been
preprocessed and writes the results to files named according to the compiler's
default file-naming conventions. More... |
OFF |
-parallel | Detects parallel loops capable of being executed safely in parallel and automatically generates multithreaded code for these loops. | OFF |
-par_report{0|1|2|3} | Controls the auto-parallelizer's diagnostic levels 0, 1, 2, or 3 as
follows:
|
OFF |
-par_threshold[n] | Sets a threshold for the auto-parallelization of loops based on the
probability of profitable execution of the loop in parallel, n=0
to 100. This option is used for loops whose computation work volume cannot
be determined at compile time. Default: n=100. More... |
OFF |
-pc32 (i32, i32em) |
Set internal FPU precision to 24-bit significand. | OFF |
-pc64 (i32, i32em) |
Set internal FPU precision to 53-bit significand. | OFF |
-pc80 (i32, i32em) |
Set internal FPU precision to 64-bit significand. | ON |
-pch | Automatic processing for precompiled headers. | OFF |
-pch_dir dirname | Directs the compiler to find and/or create a file for precompiled headers in dirname. | OFF |
-prec_div (i32, i32em) |
Disables the floating point division-to-multiplication optimization.
Improves precision of floating-point divides. More... |
OFF |
-prefetch[-] (i32 only) |
Enables [disables] the insertion of software prefetching by the compiler. Default: -prefetch. | ON |
-prof_dir dirname | Specify the directory (dirname) to hold
profile information (*.dyn, *.dpi). More... |
OFF |
-prof_file filename | Specify the filename for profiling summary file. | OFF |
-prof_format_32 | By default, the Intel compiler creates 64-bit profiling counters (.dyn and .dpi). This option creates 32-bit counters for compatibility with the Intel C++ Compiler 7.0. | OFF |
-prof_gen[x] | Instruments the program to prepare for instrumented execution and also
creates a new static profile information file (.spi).
With the x qualifier, extra source position is
collected which enables code coverage tools. More... |
OFF |
-prof_use | Uses dynamic feedback information. More... |
OFF |
-Qinstall dir | Sets dir as root of compiler installation. | OFF |
-Qlocation,tool,path | Sets path as the location of the tool
specified by tool . More... |
OFF |
-Qoption,tool,list | Passes an argument list to
another tool in
the compilation sequence, such as the assembler or linker. More... |
OFF |
-qp | Compile and link for function profiling with UNIX* prof tool | OFF |
-rcd (i32 only) |
Disables changing of the FPU rounding control. Enables fast float-to-int
conversions. More... |
OFF |
-reserve-kernel-regs (i64 only) |
Reserves registers f12-f15 and f32-f127 for use by the kernel. These will not be used by the compiler. | OFF |
-[no]restrict | Enables/disables pointer disambiguation with the restrict qualifier. | OFF |
-S | Generates assemblable files with .s suffix,
then stops the compilation. More... |
OFF |
-scalar_rep[-] | The -scalar_rep[-] compiler option enables [disables] scalar replacement performed during loop transformations. | OFF |
-shared | Produce a shared object. | OFF |
-shared-libcxa | Link Intel libcxa C++ library dynamically. | OFF |
-sox[-] (i32, i32em) |
Enables [disables] the saving of compiler options and version information in the executable file. | -sox- |
-static | Prevents linking with shared libraries. | OFF |
-static-libcxa | Link Intel libcxa C++ library statically. | OFF |
-std=gnu89 | ISO C90 plus GNU extensions. Includes some C99 features. | ON |
-std=gnu++98 | Same as -std=gnu89. | OFF |
-strict_ansi | Strict ANSI conformance dialect. | OFF |
-syntax | Checks the syntax of a program and stops the compilation process after
the C or C++ source files and preprocessed source files have been parsed.
Generates no code and produces no output files. Warnings and messages
appear on stderr. More... |
OFF |
-T file | Direct linker to read link commands from file. | OFF |
-tcheck | The -tcheck compiler option enables analysis
of threaded applications with Intel®
Thread Checker, which is required to use this option. More... |
OFF |
-tpp1 (i64 only) |
Targets optimization for the Itanium processor. More... |
OFF |
-tpp2 (i64 only) |
Targets optimization for the Itanium®
2 processor. Generated code is compatible with the Itanium processor. More... |
ON |
-tpp5 (i32 only) |
Targets the optimizations for the Pentium processor. More... |
OFF |
-tpp6 (i32 only) |
Targets the optimizations for the Pentium Pro, Pentium II and Pentium
III processors. More... |
OFF |
-tpp7 (i32, i32em) |
Targets optimizations for the Intel Pentium 4 processors. More... |
ON |
-[no]traceback | Tells the compiler to generate [not generate] extra information in the object file to allow the display of source file traceback information at run time when a severe error occurs. | OFF |
-Uname | Suppresses any definition of a macro name.
Equivalent to a #undef preprocessing directive. More... |
OFF |
-unrolln | Disable loop unrolling for n=0. | OFF |
-unroll n | Disable loop unrolling for n=0. | OFF |
-use_asm | Produce objects through assembler. | OFF |
-use_msasm (i32 only) |
Accept the Microsoft* MASM-style inlined assembly format instead of GNU-style. | OFF |
-use_pch filename | Manual use of precompiled header (filename.pchi). | OFF |
-u symbol | Pretend the symbol is undefined. | OFF |
-V | Display compiler version information. | OFF |
-v | Show driver tool commands and execute tools. | |
-vec_report[n] (i32, i32em) |
Controls the amount of vectorizer diagnostic information.
|
OFF |
-w | Disable all warnings. | OFF |
-Wall | Enable all warnings. | OFF |
-Wbrief | Enable 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. | OFF |
-Wcheck | Performs compile-time code checking for code that exhibits non-portable behavior, represents a possible unintended code sequence, or possibly affects operation of the program because of a quiet change in the ANSI C Standard. | OFF |
-wn | Control diagnostics.
|
-w1 |
-wdL1[,L2,...] | Disables diagnostics L1 through LN. More... |
OFF |
-weL1[,L2,...] | Changes severity of diagnostics L1 through
LN to error. More... |
OFF |
-Werror | Force warnings to be reported as errors. | OFF |
-wnn | Limits the number of errors displayed prior to aborting compilation
to n. More... |
OFF |
-wrL1[,L2,...] | Changes the severity of diagnostics L1
through LN to remark. More... |
OFF |
-wwL1[,L2,...] | Changes severity of diagnostics L1 through
LN to warning. More... |
OFF |
-Wl,o1[,o2,...] | Pass options o1, o2, etc. to the linker for processing. | OFF |
-Wp,o1[,o2,...] | Pass options o1, o2, etc. to the preprocessor. | OFF |
-Wp64 (i32em, i64) |
Print diagnostics for 64-bit porting. | OFF |
-x type | All source files found subsequent to -x type
will be
recognized as one of the following types:
|
OFF |
-X | Removes the standard directories from the list of directories to be
searched for include files. More... |
OFF |
-x{K|W|N|B|P} (i32, i32em) |
Generates specialized code for processor-specific codes K,
W, N, B,
and P.
More... |
OFF |
-Xlinker val | Pass val directly to the linker for processing. | OFF |
-Zp{1|2|4|8|16} | Packs structures on 1, 2, 4, 8, or 16 byte boundaries. | OFF |