ID Number: Q67033
6.00 6.00a 6.00ax | 6.00 6.00a
MS-DOS | OS/2
buglist6.00 buglist6.00a buglist6.00ax fixlist7.00
Summary:
SYMPTOMS
The Microsoft C Compiler versions 6.0, 6.0a, and 6.0ax produce the
following internal compiler error when the sample program below is
compiled with default optimization:
file.c():fatal error C1001: Internal Compiler Error
(compiler file '@(#)grammar.c:1.138', line 164)
Contact Microsoft Product Support Services
CAUSE
This error results from the combination of the following factors:
1. A semicolon (;) is missing at the end of a structure, union, or
enumerator definition.
2. The statement following the semicolon is a variable declaration
of any of the unsigned types except for "unsigned".
3. An attempt is made to access this variable in the code.
If all these conditions are met, the compiler generates the C1001
error rather than flagging the missing semicolon.
Similarly, QuickC versions 2.5 and 2.51 do not generate an error
pertaining to the missing semicolon; however, QuickC also does not
generate an internal compiler error. Instead, the program
experiences unpredictable results on attempts to use the variable
declared after the structure, union, or enumerator definition.
RESOLUTION
Check your program to make sure the above combination of factors
does not exist.
STATUS
Microsoft has confirmed this to be a problem in C versions 6.0,
6.0a, and 6.0ax and in QuickC versions 2.5 and 2.51 (buglist2.50
and buglist2.51). This problem was corrected in C/C++ version 7.0.
Sample Code
-----------
/* Compile options needed: none
*/
struct s1 {
int i;
} /* missing semicolon (;) */
unsigned char c;
void main(void)
{
c==0;
}
Additional reference words: 6.00 6.00a 6.00ax