Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

/G (Optimize for Processor) Options

Tells the compiler to optimize code generation for the specified processor.


/G{1|2}

/G1

Optimize for Itanium processor. Only available in the Itanium cross compiler or Itanium native compiler.

/G2

Optimize for Itanium2 processor (default between /G1 and /G2) Only available in the Itanium cross compiler or Itanium native compiler.

/G is available in all editions of Visual C++, but the compiler can perform more optimizations when /G is used with one of the /O compiler options. However, /O is not available in the Visual C++ standard edition.

To set this compiler option in the Visual Studio development environment

  1. Open the project's Property Pages dialog box. For details, see How to: Open Project Property Pages.

  2. Click the C/C++ folder.

  3. Click the Command Line property page.

  4. Type the compiler option in the Additional Options box.

To set this compiler option programmatically

Community Additions

ADD
Show:
© 2015 Microsoft