ID: Q119522
1.00 1.50 WINDOWS kbtool kbbuglist
The information in this article applies to:
Compiling the sample code shown below causes the fast compiler to incorrectly generate the following error message:
error C2088: '!=' : illegal for struct
Version 8.0c of the fast compiler also generates the following C1001
error message:
fatal error C1001: internal compiler error
(compiler file 'msc1.cpp', line 585)
Use the optimizing compiler. The /f- compiler switch can be used to force the use of the optimizing compiler. Comparing two pointers in the while loop instead of using the address operator (&) also alleviates the errors mentioned above.
Microsoft has confirmed this to be a problem with version 8.0 and 8.0c of the fast compiler. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
The following sample program generates the C2088 error when compiled with Visual C++ for Windows:
/* Compile options needed: none
*/
typedef struct tagCELL
{
struct tagCELL *next;
} CELL;
void main( void )
{
CELL head;
CELL *p;
// Create a very short linked list
head.next = &head;
p = head.next;
// The following line causes the C2088 and C1001 errors
while(p != (&head))
{
;
}
}
Additional reference words: 1.00 1.50 8.00 8.00c KBCategory: kbtool kbbuglist KBSubcategory: CLIss Keywords : kb16bitonly
Last Reviewed: July 23, 1997