ID Number: Q74533
6.00a 6.00ax | 6.00a
MS-DOS | OS/2
buglist6.00a buglist6.00ax fixlist7.00
Summary:
SYMPTOMS
The Microsoft C Compiler versions 6.0a and 6.0ax produce the
following internal compiler error when the sample program below is
compiled for compact (/AC), large (/AL), or huge (/AH) memory model
with any optimization that includes /Ot or /Oc or both:
file.c(15) : fatal error C1001: Internal Compiler Error
(compiler file '../grammar.c', line 140)
Contact Microsoft Product Support Services
RESOLUTION
This error may be eliminated with the following workarounds:
- Compile with optimizations disabled (/Od).
-or-
- Compile for small (/AS) or medium (/AM) memory model.
-or-
- Compile with the /qc (quick compile) option.
-or-
- In this particular example, change the variable t from a global
to a local within main().
-or-
- Use the optimize pragma to turn off the optimizations around the
function that uses the global variable. For more information on
the optimize pragma, see page 7 of the "Microsoft C Advanced
Programming Techniques" manual 7 that ships with Microsoft C
6.x.
STATUS
Microsoft has confirmed this to be a problem in C versions 6.0a and
6.0ax. This problem was corrected in C/C++ version 7.0.
More Information:
Sample Code
-----------
/* Compile options needed: /AL
*/
int t;
void test(void)
{
return;
}
void main(void)
{
t=-t;
test();
t=-t;
}
Additional reference words: 6.00a 6.00ax