Q67031: C1001: ‘@(#)regMD.c:1.100’, Line 3101
Article: Q67031
Product(s): See article
Version(s): 6.00 6.00a | 6.00 6.00a
Operating System(s): MS-DOS | OS/2
Keyword(s): ENDUSER | buglist6.00 buglist6.00a | mspl13_c
Last Modified: 18-NOV-1990
The sample code below produces the following internal compiler errors
under different versions of the compiler when any of the following
individual optimizations are used:
/Oa /Oc /Oi /On /Op /Or /Os /Ot /Ow /Oz
Internal Compiler Error Under C 6.00a
-------------------------------------
test.c(11) : fatal error C1001: Internal Compiler Error
(compiler file '@(#)regMD.c:1.100', line 3101)
Contact Microsoft Product Support Services
Internal Compiler Error Under C 6.00
------------------------------------
test.c(11) : fatal error C1001: Internal Compiler Error
(compiler file '@(#)regMD.c:1.100', line 3074)
Contact Microsoft Product Support Services
The following are three possible workarounds:
1. Add one of the following optimizations:
/Od /Oe /Og /Ol /Ox
2. Do not declare the structure variables of type register.
3. Use an if-else statement instead of the ternary operator.
Sample Code
-----------
1: void main(void)
2: {
3: struct foo {
4: int i;
5: };
6: int n;
7:
8: register struct foo *moo, *goo;
9:
10: moo=goo;
11: n= moo->i ? moo->i :10000;
12: }
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.