As described in the preceding section, specifying -g or -O0 in IA-32-targeted compilations automatically disables the -fp option for IA-32-targeted compilations. The compiler lets you generate code to support symbolic debugging while the -O1, or -O2 optimization options are specified on the command line along with -g. However, you can receive these unexpected results:
If you specify the -O1, or -O2 options with the -g option, some of the debugging information returned may be inaccurate as a side-effect of optimization.
If you specify the -O1, or -O2 options, the -fp option will not be disabled. In this case, if you want to maintain the frame pointer while generating debug information, for IA-32-targeted compilations you must explicitly specify the -fp- option on the command line to disable -fp.