From: Rudolf Polzer Newsgroups: comp.os.msdos.djgpp Subject: Re: Internal compiler error - not covered by the FAQ Date: Thu, 02 Nov 2000 12:42:05 GMT Organization: Deja.com - Before you buy. Lines: 66 Message-ID: <8trnes$u48$1@nnrp1.deja.com> References: <8t3lg2$o6t$1 AT nnrp1 DOT deja DOT com> <39f5dd04 DOT 35951623 AT news DOT freeserve DOT net> <8tp1q3$n3r$1 AT nnrp1 DOT deja DOT com> <3a009f41 DOT 55595835 AT news DOT freeserve DOT net> NNTP-Posting-Host: 212.185.252.69 X-Article-Creation-Date: Thu Nov 02 12:42:05 2000 GMT X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt) X-Http-Proxy: HTTP/1.0 spcss41. (IBM-PROXY-WTE), 1.1 x71.deja.com:80 (Squid/1.1.22) for client 212.185.252.69 X-MyDeja-Info: XMYDJUIDrpolzer To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com In article <3a009f41 DOT 55595835 AT news DOT freeserve DOT net>, dontmailme AT iname DOT com wrote: > Rudolf Polzer wrote: > > > BTW, there is another problem: > > > > std::map < ::Sound::Sound > ::iterator i = m.begin() > > > > gives an parse error, while > > > > typedef ::Sound::Sound Snd; > > // ... > > std::map < Snd > ::iterator i = m.begin() > > > > does not. Why? > > > > > > and recompiling in standard-compliant compilers fails. > > It's not surprising it fails in most compilers, since std::map needs > at least two template arguments. But I can't get GCC to accept fewer > than two either. Can you post a complete minimal example of a program > that demonstrates this? Sorry, it was a typo. It really was map<::Entity::Entity *, ::Sound::Sound *> And I just found out it was because <: is a digraph, and I accidentally left out spaces. > > > And there seems to be another problem: When I switch on -Wall, my > > programs do not compile any more with messages like this: > > > > In method `M::M(const int &)': > > test.cpp(12) Error: instantiated from here > > test.cpp(6) Warning: statement with no effect > > There were some errors > > That's strange. Why is "instantiated from here" an error? > I tried compiling your example and I get this: Compiling from commandline gave no error, and your message format. It seems to be a RHIDE bug. Sorry. > > test.cpp: In method `M::M(const int &)': > test.cpp:12: instantiated from here > test.cpp:6: warning: statement with no effect > > There are no errors and I get a working executable. Your compiler > messages also have a different format than mine. What version > of gcc are you using (gpp --version)? > gpp 2.952 gcc 2.952 gdb 4.18 -- Rudolf Polzer REBOUNCE - http://www.mycgiserver.com/~rebounce Sent via Deja.com http://www.deja.com/ Before you buy.