Microsoft KB Archive/119522

{|
 * width="100%"|

BUG: C2088 Error Incorrectly Generated by Fast Compiler

 * }

Q119522

1.00 1.50 WINDOWS kbtool kbbuglist -- The information in this article applies to: - The Microsoft C/C++ Compiler (CL.EXE), included with: Microsoft Visual C++ for Windows, versions 1.0 and 1.5 -- SYMPTOMS ======== 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) RESOLUTION ========== 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. STATUS ====== 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. MORE INFORMATION ================ The following sample program generates the C2088 error when compiled with Visual C++ for Windows: Sample Code --- /* 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

Issue type :

Technology :