C9005000: C1001: gencode.c, Line 437

ID Number: Q61973

6.00 6.00a 6.00ax | 6.00 6.00a

MS-DOS | OS/2

buglist6.00 buglist6.00a buglist6.00ax fixlist7.00

Summary:

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 the quick compile (/qc) option:

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

(compiler file 'gencode.c', line 437)

Contact Microsoft Product Support Services

In this particular case, one workaround for the error would be to

simplify the expression by assigning (p2-p1) to a temporary variable.

For example:

ptrdiff_t c;

c = p2-p1;

temp = 1 + (double)c;

Note: The C1001 error message shown above also occurs when casting "a"

to a float.

Microsoft has confirmed this to be a problem in C versions 6.0, 6.0a,

and 6.0ax. This problem was corrected in C/C++ version 7.0.

Sample Code

-----------

/* Compile options needed: /qc

*/

#include <stdio.h>

#include <stddef.h>

void main (void)

{

char *p1, *p2;

double temp;

p1 = p2 = NULL;

temp = 1 + (double)(p2-p1); // This line causes the error

}