delorie.com/archives/browse.cgi | search |
From: | dontmailme AT iname DOT com (Steamer) |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: Internal compiler error - not covered by the FAQ |
Date: | Wed, 01 Nov 2000 22:55:13 GMT |
Organization: | always disorganized |
Lines: | 39 |
Message-ID: | <3a009f41.55595835@news.freeserve.net> |
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> |
NNTP-Posting-Host: | modem-95.massachusetts.dialup.pol.co.uk |
X-Trace: | news8.svr.pol.co.uk 973119315 8821 62.137.72.95 (1 Nov 2000 22:55:15 GMT) |
NNTP-Posting-Date: | 1 Nov 2000 22:55:15 GMT |
X-Complaints-To: | abuse AT theplanet DOT net |
X-Newsreader: | Forte Free Agent 1.11/32.235 |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
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? > 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<int>::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: test.cpp: In method `M<int>::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)?
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |