The information in this article applies to:
SYMPTOMSWith global optimization (/Og) enabled, the Visual C++ 6.0 compiler may generate incorrect code for functions that pass a structure by value. This manifests itself as a structure which appears to have incorrect values after being passed into the function. CAUSEVisual C/C++ functions make local copies of its arguments to be referenced during a function's execution. Under a few circumstances, global optimization can cause the stack space for the copy of the structure to be allocated without copying the field values. RESOLUTION
Disable global optimizations. Global optimizations can be disabled for the entire project, or for a particular source file by removing /Og from either the project's release build compiler settings or an individual file's release build compiler settings.
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article. Q194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why Additional query words:
Keywords : kbservicepack kbVC600 kbVS600sp2 kbVS600SP1 kbVS600sp3fix |
Last Reviewed: May 19, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |