ID Number: Q70251
6.00 6.00a 6.00ax | 6.00 6.00a
MS-DOS | OS/2
buglist6.00 buglist6.00a buglist6.00ax fixlist7.00
Summary:
The Microsoft C Compiler versions 6.0, 6.0a, and 6.0ax produce the
following internal compiler errors when the sample program below is
compiled with default optimization or any one of the following
optimization options:
/Oa /Oc /Oi /On /Op /Or /Os /Ot /Ow /Oz
With C 6.0a and 6.0ax
---------------------
file.c(12) : fatal error C1001: Internal Compiler Error
(compiler file '@(#)regMD.c:1.110', line 4688)
Contact Microsoft Product Support Services
With C 6.0
----------
file.c(12) : fatal error C1001: Internal Compiler Error
(compiler file '@(#)regMD.c:1.100', line 4634)
Contact Microsoft Product Support Services
The following is a list of possible workarounds for these errors:
1. Add one of the following optimizations to the existing options:
/Od /Oe /Og /Ol /Ox
-or-
2. Compile with the /qc (quick compile) option.
-or-
3. Rearrange the code (for example, use temporary variables to break
up the single expression).
Microsoft has confirmed this to be a problem in C versions 6.0, 6.0a,
and 6.0ax. This problem was corrected in C version 7.0.
Sample Code
-----------
/* Compile options needed: /Oa ( or any of the following)
/Oc /Oi /On /Op /Or /Os /Ot /Ow /Oz
*/
void main(void)
{
long color, r, g, b;
r=(color>>16);
g=((color-(r<<16))>>8)&255L;
b=((color-(r<<16)-(g<<8)))&255L;
}