BUG: C2088 Error Incorrectly Generated by Fast Compiler

Last reviewed: July 22, 1997
Article ID: 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


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: July 22, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.