C1001: Internal Compiler Error: grammar.c, Line 108

ID Number: Q44077

5.10 | 5.10

MS-DOS | OS/2

buglist5.10 fixlist6.00

Summary:

The Microsoft C Compiler version 5.1 produces the following internal

compiler error when the sample program below is compiled with default

options:

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

(compiler file '@(#)grammar.c:1.29', line 108)

Contact Microsoft Technical Support

This error also may be caused by using either of the graphics

functions _moveto_w() or _lineto_w() when compiling with QuickC

version 2.0 header files such as GRAPH.H. In this case, the error is a

result of the expression resulting from the expansion of the

_moveto_w() and _lineto_w() macros, or several other window macros. An

example of this is TURTLE.C and WINDOW.C from the GRDEMO sample

program that comes with QuickC 2.0.

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

problem was corrected in C version 6.0.

Sample Code

-----------

/* Compile options needed: none

*/

struct ice

{

short x, y;

};

struct ice think(double);

void Just(struct ice);

void main(void)

{

Just(think(6.00));

}

Workaround

----------

In the sample program above, the error can be worked around by

changing the structure, ice, to the following:

struct ice

{

short x,y;

int fudge_factor;

};