473,670 Members | 2,343 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

internal compile error

Hello,

with following example:
//main.cpp
#include <string>
using std::string;

struct iFactory {
virtual void create(void** o)=0;
};
template <typename TYPE> struct Factory : public iFactory {
Factory(){}
virtual void create(void** o) {*o = new TYPE();}
};
struct tFactoryMap {string ID; iFactory* factory;};
class Foo {
void test(){}
};
tFactoryMap fmap[] = { {"Foo",new Factory<Foo>()} };

int main () {
return 0;
}

i get an internal compiler error:

fatal error C1001: INTERNER COMPILERFEHLER (Compilerdatei
'f:\vs70builds\ 3077\vc\Compile r\Utc\src\P2\eh except.c', Zeile 908)
The problem causes the Constructor Factory::Factor y(), if i comment the
constructor out everything compiles without error.

This is valid c++ code, isn't it ? Or could be the constructor/new in
the initializing list for fmap be illegal ? Anyway, the compiler should
give a more meaningful messag :-)

Where can such bugs be reported ?
btw: I'm using vc7.1 from visual studio .net 2003. Any hints when a
first service pack will be available, i get from time to time crashes of
the IDE (mostly while debugging) and occasional an internal compiler error.

best regards,

Vasco

Nov 17 '05 #1
2 1689
Vasco Lohrenscheit wrote:
Hello,

with following example:
[snip]
i get an internal compiler error:

fatal error C1001: INTERNER COMPILERFEHLER (Compilerdatei
'f:\vs70builds\ 3077\vc\Compile r\Utc\src\P2\eh except.c', Zeile 908)
The problem causes the Constructor Factory::Factor y(), if i comment
the constructor out everything compiles without error.

This is valid c++ code, isn't it ?
Yes, it is - as far as I can see anyway. Comeau likes it too.
Or could be the constructor/new in
the initializing list for fmap be illegal ?
AFIAK, it's legal, but it is the source of confusion for the compiler.

Re-writing the code as:

Factory<Foo> fFoo;

tFactoryMap fmap[] =
{
{ "Foo", &fFoo }
};

gets around the ICE.
Anyway, the compiler
should give a more meaningful messag :-)
Unforutnately, there's not much more it can report in the case of an ICE,
since by definition it's a situation that wasn't (properly) desgined-for in
the compiler.

Where can such bugs be reported ?
Consider it reported.


btw: I'm using vc7.1 from visual studio .net 2003. Any hints when a
first service pack will be available, i get from time to time crashes
of the IDE (mostly while debugging) and occasional an internal
compiler error.


There's been no indication that a service pack for VC7.1 will be forthcoming
anytime soon. This ICE also occurs with the current "VC8" alpha version of
the compiler - I'll submit a bug report to the alpha for this bug so it
might be fixed in "VC8".

-cd
Nov 17 '05 #2
Hello Vasco,

We are currently investigating this issue. Thank you for reporting it.

Mitchell Slep
Visual C++ team

--------------------
From: Vasco Lohrenscheit <valoh@_NO_SPAM _web.de>
Newsgroups: microsoft.publi c.dotnet.langua ges.vc
Subject: internal compile error
Date: Wed, 14 Jan 2004 01:44:13 +0100
Organization : 1&1 Internet AG
Lines: 52
Message-ID: <bu**********@o nline.de>
NNTP-Posting-Host: p50860d1d.dip0. t-ipconnect.de
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: online.de 1074041255 12272 80.134.13.29 (14 Jan 2004 00:47:35 GMT)
X-Complaints-To: ab***@einsundei ns.com
NNTP-Posting-Date: Wed, 14 Jan 2004 00:47:35 +0000 (UTC)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031007
X-Accept-Language: en-us, en
Path: cpmsftngxa07.ph x.gbl!cpmsftngx a06.phx.gbl!TK2 MSFTNGP08.phx.g bl!newsfeed00.s ul.t-online.de!t-online.de!takem y.news.telefoni ca.de! telefonica.de!f eed.news.schlun d.de!schlund.de !news.online.de !not-for-mailXref: cpmsftngxa07.ph x.gbl microsoft.publi c.dotnet.langua ges.vc:31980
X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.vc

Hello,

with following example:
//main.cpp
#include <string>
using std::string;

struct iFactory {
virtual void create(void** o)=0;
};
template <typename TYPE> struct Factory : public iFactory {
Factory(){}
virtual void create(void** o) {*o = new TYPE();}
};
struct tFactoryMap {string ID; iFactory* factory;};
class Foo {
void test(){}
};
tFactoryMap fmap[] = { {"Foo",new Factory<Foo>()} };

int main () {
return 0;
}

i get an internal compiler error:

fatal error C1001: INTERNER COMPILERFEHLER (Compilerdatei
'f:\vs70builds \3077\vc\Compil er\Utc\src\P2\e hexcept.c', Zeile 908)
The problem causes the Constructor Factory::Factor y(), if i comment the
constructor out everything compiles without error.

This is valid c++ code, isn't it ? Or could be the constructor/new in
the initializing list for fmap be illegal ? Anyway, the compiler should
give a more meaningful messag :-)

Where can such bugs be reported ?
btw: I'm using vc7.1 from visual studio .net 2003. Any hints when a
first service pack will be available, i get from time to time crashes of
the IDE (mostly while debugging) and occasional an internal compiler error.

best regards,

Vasco

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
2672
by: Matthew Del Buono | last post by:
Don't try to solve the problem. I've found a way -- around or fixing it. I'm just curious as to whether this is Microsoft's problem in their compiler or if there's a standard saying this is to be true (not necessarily an internal compiler error, but still an error) This may just a bit OT, but I decided to post it here instead of Microsoft because my question is more directed towards standards... Of course, any other day I would have...
1
13218
by: Ayende Rahien | last post by:
reparing resources... Updating references... Performing main compilation... error CS0583: Internal Compiler Error (0xc0000005 at address 53168B12): likely culprit is 'BIND'. An internal error has occurred in the compiler. To work around this problem,
4
3315
by: David Sworder | last post by:
Consider the following line of code (it's not important what it does): resp.DocItem=Relations.SelectDocItems_BySearchString(req.SearchPhrase); It turns out that this line is in error. The property 'DocItem' should be 'DocItems.' The problem is that instead of notifying me of where the problem has occurred, the compiler just crashes with an "internal error" (see bottom of this message). Now if I were to write: ...
19
3565
by: Martin Oddman | last post by:
Hi, I have a compiling problem. Please take a look at the code below. I have an application that is built upon three tiers: one data tier (Foo.DataManager), one business tier (Foo.Kernel) and one web presentation tier (Foo.WebFiles). The data tier shall only be accessible thru the business tier so I do NOT want a reference to the data tier in the presentation tier. In the business tier I have a class with the name CategoryItem that...
2
6798
by: Chien Lau | last post by:
I frequently define internal UserControl-derived classes in my WinForms apps: internal class MyUserControl:UserControl{ ... } I'll often need to embed these controls in a Form, whose class is contained in the same assembly as the control. As far as I know, the only way to do this using the designer is to add the UserControl-derived object
6
2724
by: David Lack | last post by:
Hi, I recently installed a 60-day trial of .NET 2003 on my development system. I made tests with previous personal projects (which compiled ok with VC6) and some open source files, and keep facing the same problem with many of them: I keep getting errors such as: ....\WinUser.h(8028): fatal error C1001: INTERNAL COMPILER ERROR (compiler file 'msc1.cpp', line 2701)
0
1898
by: Jim Heavey | last post by:
Internal Compiler Error: stage 'BEGIN' Hello, I had an application which was working just fine and I decided to modify all database access within the application to utilizie a new Namespace that I had developed which would handle all database access. After I modified all of the code to point to the new namespace and created all of the necessary references, I get an internal compile error when I attempt to re-compile. I have create a new...
2
1985
by: Jim Heavey | last post by:
Hello, I had an application which was working just fine and I decided to modify all database access within the application to utilizie a new Namespace that I had developed which would handle all database access. After I modified all of the code to point to the new namespace and created all of the necessary references, I get an internal compile error when I attempt to re-compile. I have create a new project and started fresh and I get the...
9
5159
by: dylan.miller | last post by:
I'm having trouble understanding the internal access modifier. There are many classes in my assembly that should not be accessible outside of the assembly. I've used the internal access modifier for these classes. I have public classes that use the internal classes, but I get a CS0051 error if I use an internal class as a parameter to a protected function of a public class. For example: internal class InternalClass { }
0
8469
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8386
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8592
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8661
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7419
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6213
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5684
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4211
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1794
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.