KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q66322: D2030 Compiler Error in "P3" or Machine Hangs During Compile

Article: Q66322
Product(s): See article
Version(s): 6.00a  | 6.00a
Operating System(s): MS-DOS | OS/2
Keyword(s): ENDUSER | buglist6.00a | mspl13_c
Last Modified: 24-OCT-1990

When the code below is compiled under OS/2 using the Microsoft C
version 6.00a compiler and using the following command-line switches

   cl /Gi /Od test.c

the result is as follows:

   Command line error D2030 : INTERNAL COMPILER ERROR IN 'P3'
                 Contact Microsoft Product Support Services

Under DOS, the system will hang during pass three of the compiler.

Code Example
------------

#include <stdio.h>
void foo(void)
{
     char Key;
     switch( Key = getch() ) {
           case '1' : break;
           case '2' :
           default: break;
     }
}
void main(void)
{
     foo();
}

This error indicates that the third pass of the compiler ("P3") is
encountering a general protection fault. This error does not occur
under C version 6.00.

Workaround
----------

The following are three possible workarounds:

1. Compile without the /Gi option.

2. Compile with the /qc option.

3. Compile with the medium or large memory model.

Microsoft has confirmed this to be a problem with the C compiler
version 6.00a. We are researching this problem and will post new
information here as it becomes available.

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.

Copyright Microsoft Corporation 1986-2002.