BUG: Warning C4056 Generated When /Op Option is Used

Last reviewed: July 24, 1997
Article ID: Q120218
The information in this article applies to:
  • Microsoft C/C++ Compiler (CL.EXE) included with: - Microsoft Visual C++, 32-bit Edition, versions 2.0, 4.0, 4.1, 4.2,

         5.0 on the following platform:
         - x86
    
    - Microsoft Visual C++ 2.0 Cross-Development Edition for the Macintosh

SYMPTOMS

The following warning is generated when the sample code listed in the More Information section below is compiled with the option /Op and the warning level set to 3 or higher:

   warning C4056 : overflow in floating-point constant arithmetic

RESOLUTION

Ignore the warning as it is generated incorrectly. Alternatively, you can suppress the warning by using the /W2 option.

STATUS

Microsoft has confirmed this to be a bug in the products listed above. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

Sample Code to Reproduce Problem

   /* Compile options needed:   /Op /W3
   */

   void main()
   {
       double i;
       i = -1.0;
   }


Additional query words: 9.00 10.00 10.10 10.20
Keywords : CLIss vcbuglist400 vcbuglist500 VCMac VCx86
Version : 2.0 4.0 4.1 4.2 5.0
Platform : MACINTOSH NT WINDOWS
Issue type : kbbug


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: July 24, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.