fatal error C1001: INTERNAL COMPILER ERROR

  • Thread starter Thread starter Daniel P.
  • Start date Start date
D

Daniel P.

I'm trying to move a C++ app from Visual Studio C++ 6.0 to MSDEV .NET 2003
and I get the following error. It happens a header file at a forward
declaration:

class CString; // <<<< here


Compiling...
cl : Command line warning D4025 : overriding '/EHs' with '/EHa'
StdAfx.cpp
d:\dev\CURRENT\retail\..\Common\Stuff\XHelpers.h(30) : fatal error C1001:
INTERNAL COMPILER ERROR
(compiler file 'msc1.cpp', line 2701)
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more information
 
Daniel P. said:
I'm trying to move a C++ app from Visual Studio C++ 6.0 to MSDEV .NET 2003
and I get the following error. It happens a header file at a forward
declaration:

class CString; // <<<< here


Compiling...
cl : Command line warning D4025 : overriding '/EHs' with '/EHa'
StdAfx.cpp
d:\dev\CURRENT\retail\..\Common\Stuff\XHelpers.h(30) : fatal error C1001:
INTERNAL COMPILER ERROR
(compiler file 'msc1.cpp', line 2701)
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more information


The error must be something that you didn't
post. This

class CString;

int main()
{
return 0;
}

compiles fine for me.
VC usually ICEs on real syntax errors. Of
course, with an error message like this, it
is hard to find the cause. I suggest you
try to throw together a simple repro case
(preferrably <50LOC). It might well be you
find the error while doing this. Otherwise
someone here might.
Also, if there's a repro it can be added to
MS' bug DB, so we have a chance to get this
fixed for the next version.

Schobi

--
(e-mail address removed) is never read
I'm Schobi at suespammers dot org

"Sometimes compilers are so much more reasonable than people."
Scott Meyers
 
Unfortunately it is a pretty big project.
It fires the error when it deals with "stdafx.h". This file includes lots of
other files.

I was thinking to do what you suggested: create a test project to duplicate
the error. I hope I'll have time.

Thanks!
 
It's an MDI app using MFC.
I succefully created a test project.

It seems that if you have a header file that has

class CString;

and you include this header file into "stdafx.h" you get that error.

I'm going to send the test project to MS.

Thanks!
 
I spoke with Microsoft incident support for my MSDN licence and the fix is:

#if _MFC_VER < 0x0700
class CString;
#endif

CString is not a class in MFC anymore. It is a template in ATL so forward
declarations are invalid.
 
have the same errors, please help me!

[strstream]
// CLASS istringstream
class istringstream
: public istream // <<< here

D:\visualcpp\Vc7\include\strstream(120) : fatal error C1001: INTERNER COMPILERFEHLER
(Compilerdatei 'msc1.cpp', Zeile 2701)
Wählen Sie im Menü '?' von Visual C++
den Befehl 'Software Service', oder öffnen Sie die Hilfedatei für den Software Service, um weitere Informationen zu erhalten


very important, i think this is a bug.

is there a patch?

**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
 
There is no patch yet but there may be one.

alex tugarev said:
have the same errors, please help me!

[strstream]
// CLASS istringstream
class istringstream
: public istream // <<< here

D:\visualcpp\Vc7\include\strstream(120) : fatal error C1001: INTERNER COMPILERFEHLER
(Compilerdatei 'msc1.cpp', Zeile 2701)
Wählen Sie im Menü '?' von Visual C++
den Befehl 'Software Service', oder öffnen Sie die Hilfedatei für
den Software Service, um weitere Informationen zu erhalten
very important, i think this is a bug.

is there a patch?

**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP &
ASP.NET resources...
 
alex tugarev said:
have the same errors, please help me!


You also have an ICE. It might be triggered by the
same error, or it might not.
[strstream]
// CLASS istringstream
class istringstream
: public istream // <<< here

D:\visualcpp\Vc7\include\strstream(120) : fatal error C1001: INTERNER COMPILERFEHLER
(Compilerdatei 'msc1.cpp', Zeile 2701)
Wählen Sie im Menü '?' von Visual C++
den Befehl 'Software Service', oder öffnen Sie die Hilfedatei für den Software Service, um weitere Informationen zu
erhalten


very important, i think this is a bug.

An ICE certainly is a bug.
is there a patch?

Show some code (<20LOC) that we can paste
into our editor, compile, and see the error.

Schobi

--
(e-mail address removed) is never read
I'm Schobi at suespammers dot org

"Sometimes compilers are so much more reasonable than people."
Scott Meyers
 
Hi...

To reproduce, forward declare the CString in the header file.

If you just remove the forward declaration, it should work fine.

Thanks,
G
The error must be something that you didn't
post. This

class CString;

int main()
{
return 0;
}

compiles fine for me.
VC usually ICEs on real syntax errors. Of
course, with an error message like this, it
is hard to find the cause. I suggest you
try to throw together a simple repro case
(preferrably <50LOC). It might well be you
find the error while doing this. Otherwise
someone here might.
Also, if there's a repro it can be added to
MS' bug DB, so we have a chance to get this
fixed for the next version.

Schobi

--
(e-mail address removed) is never read
I'm Schobi at suespammers dot org

"Sometimes compilers are so much more reasonable than people."
Scott Meyers

___
Newsgroups brought to you courtesy of www.dotnetjohn.com
 
G said:
Hi...

To reproduce, forward declare the CString in the header file.

If you just remove the forward declaration, it should work fine.

I'm not sure what you mean. I _did_
forward declare 'CString' in the code
below.
Thanks,
G
[...]
The error must be something that you didn't
post. This

class CString;

int main()
{
return 0;
}

compiles fine for me.
[...]

Schobi

--
(e-mail address removed) is never read
I'm Schobi at suespammers dot org

"Sometimes compilers are so much more reasonable than people."
Scott Meyers
 
Back
Top