KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q62180: Internal Compiler Error: @(#)main.c:1.176, Line 807

Article: Q62180
Product(s): See article
Version(s): 6.00   | 6.00
Operating System(s): MS-DOS | OS/2
Keyword(s): ENDUSER | buglist6.00 | mspl13_c
Last Modified: 29-MAY-1990

The following code generates an internal compiler error:

1. void main (void)
2. {
3.    _asm
4.    {
5.       fscale
6.    foo:
7.       fprem
8.    }
9. }

Although this code is not overly useful, this is the minimum required
to reproduce the error. The following command-line options were used:

   cl /Od /c /W4 foo.c

The sample code produces the following output:

Microsoft (R) C Optimizing Compiler Version 6.00
Copyright (c) Microsoft Corp 1984-1990. All rights reserved.

foo.c
foo.c(9) : warning C4102: 'foo' : unreferenced label
foo.c(6) : fatal error C1001: Internal Compiler Error
           (compiler file '@(#)main.c:1.176', line 807)
           Contact Microsoft Product Support Services

As a workaround, the optimize pragma can be used to turn off all
optimizations, as follows:

 1. #pragma optimize ("", off)
 2.
 3. void main (void)
 4. {
 5.    _asm
 6.    {
 7.       fscale
 8.    foo:
 9.       fprem
10.    }
11. }

Microsoft has confirmed this to be a problem with C version 6.00. We
are researching this problem and will post new information here as it
becomes available.

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.

Copyright Microsoft Corporation 1986-2002.