ID Number: Q65544
6.00 | 6.00
MS-DOS | OS/2
buglist6.00 fixlist6.00a
Summary:
SYMPTOMS
The Microsoft C Compiler version 6.0 produces the following internal
compiler error when the sample program below is compiled with loop
optimization (/Ol) enabled:
file.c(13) : fatal error C1001: Internal Compiler Error
(compiler file '@(#)grammar.c:1.138', line 164)
Contact Microsoft Product Support Services
RESOLUTION
To work around this problem, compile without /Ol or use the #pragma
optimize directive to turn off loop optimization for the function in
which the error is occurring.
Another valid workaround is to use an if-then construct in place of
the ternary operators.
STATUS
Microsoft has confirmed this to be a problem in C version 6.0. This
problem was corrected in C version 6.0a.
More Information:
Sample Code
-----------
/* Compile options needed: /Ol
*/
void main(void)
{
double x;
int j;
for(j = 0; j < 1; j++) {
x = j > 0 ? 0.0 : 0.5;
x = j >> 2 & 1 > 0 ? 0.0 : 0.5;
}
}
Additional reference words: 6.00