Specifications
46 Troubleshooting and Portability Issues Chapter 4
32035 Rev. 3.22 November 2007
Compiler Usage Guidelines for AMD64 Platforms
GCC provides switches, such as the -mieee-fp switch, to control whether or not the compiler uses
IEEE floating-point comparisons.
The user should not use the -ffast-math optimization recommended in the general optimization
guidelines in this case. Using the -ffast-math switch results in a fast but less predictable floating-
point model. The user should also be careful to not use a switch that implies -ffast-math.
Does your code need C++ exception handling?
GCC generates the extra code needed to propagate exceptions with the -fexceptions switch. For some
targets, propagating exceptions implies that GCC generates frame unwind information for all
functions. Generating frame unwind information for all functions can produce significant data-size
overhead, although it does not affect the execution of a program.
By default, GCC enables the - fexceptions option for languages like C++ that normally require
exception handling. GCC disables the -fexceptions option for languages like C that do not normally
require it. You may need, however, to enable this option when compiling C code that must
interoperate properly with exception handlers written in C++. You may also wish to disable this
option if you are compiling older C++ programs that do not use exception handling.
Do you need to unwind the stack using the frame pointer?
The frame pointer is omitted by default on 64-bit GCC compilers to improve performance. This
default omission can be reversed by using -fno-omit-frame-pointer.
4.3 Intel Compilers (64-Bit) for Linux
®
See section 4.9, “Intel Compilers (32-Bit) for Linux®”, on page 50 for the portability and
troubleshooting issues with this compiler.
4.4 PathScale Compilers (64-Bit) for Linux
®
For information on diagnosing problems with the PathScale compiler, refer to the tuning document
distributed with the PathScale compiler suite.
4.5 Intel Compilers (64-Bit) for Microsoft
®
Windows
®
See section 4.11, “Intel Compilers (32-Bit) for Microsoft® Windows®”, on page 51 for
troubleshooting errors with this compiler.