Help and Support

Article ID: 120965 - Last Review: July 5, 2005 - Revision: 1.1

FIX: C1001: 'e:\b_bld\c2\P2\main.c', line 374 with /Zi Switch

This article was previously published under Q120965

On This Page

Expand all | Collapse all

SYMPTOMS

Compiling an application that uses a local temporary static union, as does the sample code shown in the More Information section below, may cause the following internal compiler error when built with debug information only:
TEST.CPP(9) : fatal error C1001: INTERNAL COMPILER ERROR
(compiler file 'e:\b_bld\c2\P2\main.c', line 374)
Please choose the Technical Support command on the Visual C++ Help menu, or open the Technical Support help file for more information
TEST.CPP is the sample code file given in the More Information section below.

RESOLUTION

Use either of these two workarounds:

  • Remove the /Zi compiler option. -or-

  • Create an object to represent the local static union:
          static union { int z;} tmp;
    						

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This problem was fixed in Visual C++, 32-bit Edition, version 4.0.

MORE INFORMATION

Sample Code

/* Compile options needed: /Zi
*/ 

static union { int i; };
static union { int k; };

void local()
{
   union { int x; };
   union { int y; };
   static union { int z; };
}

				

APPLIES TO
  • Microsoft Visual C++ 2.0 Professional Edition
Keywords: 
kbbug kbfix KB120965
Retired KB ArticleRetired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.

Article Translations