C9005000: C1001: grammar.c, Line 140

ID Number: Q62306

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 for compact

(/AC) or large (/AL) memory model with default optimization:

file.c(16) : fatal error C1001: Internal Compiler Error

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

Contact Microsoft Product Support Services

RESOLUTION

To work around this problem, one of several solutions may be used:

1. Use the nonintrinsic form of strcpy.

2. Do not specify i as a register variable.

3. If appropriate, use a memory model with near data pointers.

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: /AL

*/

#include <string.h>

#pragma intrinsic( strcmp ) /* Intrinsic form of strcmp */

char *s1 = "Standard input", /* s1 and s2 must be */

*s2 = "Standard output"; /* initialized to fail. */

void main()

{

register int i; /* i must be register */

if( strcmp( s1, s2 ) == 0 );

for( i = 0; i < 5; ++i );

}

Additional reference words: 6.00