C9007000: C1001: grammar.c, Line 140

ID Number: Q64021

6.00 | 6.00

MS-DOS | OS/2

buglist6.00 fixlist6.00a

Summary:

SYMPTOMS

The code below, when compiled with Microsoft C 6.0, produces the

following error message:

fatal error C1001: Internal Compiler Error

(compiler file '../grammar.c', line 140)

Contact Microsoft Product Support Services

RESOLUTION

The following are some possible solutions:

1. Use /Oe, /Ol, /Ox, /Oet, or /Olt when compiling.

-or-

2. Put the typedef and struct x definitions together.

STATUS

Microsoft has confirmed this to be a problem in C version 6.0. This

problem was corrected in version 6.0a of the Microsoft C Compiler.

More Information:

Sample Code

-----------

/* Compile Line: cl /Oit /AL test.c

*/

struct x

{

int a;

int *b;

double **c;

};

typedef struct x TEST;

void function (TEST *pTEST)

{

double xx = 0;

int i,j;

for (i=0;i<pTEST->a;i++)

for(j=0;j<pTEST->b[i];j++)

if (pTEST->c[i][j]>xx) // Fails here...

pTEST->b[i]=j;

}

Compiling this code with one of the following options will produce

the internal compiler error mentioned above:

/Ot /Oi /Oit

Additional reference words: 6.00 6.00a