ID Number Q83228
6.00 6.00a 6.00ax | 6.00 6.00a
MS-DOS | OS/2
buglist6.00 buglist6.00a buglist6.00ax fixlist7.00
Summary:
PROBLEM ID: C9204003
SYMPTOMS
Compiling the program below causes the Microsoft C Compiler
versions 6.0, 6.0a, and 6.0ax to generate the following error:
fatal error C1001: Internal Compiler Error
(compiler file ''@(#)grammar.c:1.138', line 164)
Contact Microsoft Product Support Services
Compiling with the Microsoft QuickC for Windows Graphical
Development Environment version 1.0 or the Microsoft QuickC
Compiler version 2.5 or 2.51 produces the following error message:
fatal error C1001: Internal Compiler Error
(compiler file 'gencode.c', line 437)
Contact Microsoft Product Support Services
These errors occur regardless of memory model or optimization
level.
CAUSE
The problem is caused by trying to increment a variable of type
double by the value of a pointer rather than the value the pointer
points to. The compiler does not flag the error properly.
RESOLUTION
The source code that generates this error is incorrect. The code
should increment the double by the value pointed to by the pointer.
The code example below demonstrates the statement that allows the
program to compile correctly.
STATUS
Microsoft has confirmed this to be a problem in C versions 6.0,
6.0a, and 6.0ax, QuickC for Windows version 1.0 (buglist 1.0), and
QuickC versions 2.5 and 2.51 (buglist2.50 and buglist2.51). This
problem was corrected in C/C++ version 7.0.
More Information:
The sample code below reproduces the problem.
Sample Code
-----------
/* Compile options needed: none
*/
void func (void)
{
double dbl;
double far * dbl_ptr;
long index;
for(index= 1; index<= 2; index++)
{
dbl+= dbl_ptr; /* This causes a C1001 */
/* dbl+= *dbl_ptr; ** This was the intended statement ***/
}
}
Additional reference words: 6.00 6.00a 6.00ax 2.50 1.00 QC/Win
s_quickc