Article View: be.comp.programming
Article #6465Re: gcc internal compiler error (was: ISO C++ does not permit ...)
From: Nicolas Barbier
Date: Tue, 10 Dec 2002 20:58
Date: Tue, 10 Dec 2002 20:58
66 lines
3172 bytes
3172 bytes
Nicolas Barbier wrote:
> Owla zeg, die -W veroorzaakt een internal compiler error. Ben aan het
> zoeken of dit nog het geval is met de nieuwste snapshot als ik die in mijn
> totale onkennis gecompileerd krijg :-).
Ok, never mind, is opgelost in een snapshot van gcc 3.3. Of in feite geeft
hij een of andere foutmelding die ik niet begrijp maar er is dus blijkbaar
toch aan gewerkt :-).
<sessie>
itsme@stoned:~$ ./gcc_test/bin/g++ --version
g++ (GCC) 3.3 20021209 (experimental)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
itsme@stoned:~$ cat test.cpp
template<class T1>
class T
{
public:
static int var;
};
class A: public T<A>
{
};
int A::var = 0;
int main()
{
A a;
a.var = 6;
}
itsme@stoned:~$ ./gcc_test/bin/g++ -Wall -ansi -pedantic test.cpp
test.cpp:12: warning: ISO C++ does not permit `T<A>::var' to be defined as
`A::
var'
test.cpp: In function `int main()':
test.cpp:16: error: `A A::a' is not a static member of `class A'
test.cpp:17: error: `a' undeclared (first use this function)
test.cpp:17: error: (Each undeclared identifier is reported only once for
each
function it appears in.)
itsme@stoned:~$ ./gcc_test/bin/g++ -W -Wall -ansi -pedantic test.cpp
test.cpp:12: warning: ISO C++ does not permit `T<A>::var' to be defined as
`A::
var'
test.cpp: In function `int main()':
test.cpp:16: error: `A A::a' is not a static member of `class A'
test.cpp:17: error: `a' undeclared (first use this function)
test.cpp:17: error: (Each undeclared identifier is reported only once for
each
function it appears in.)
itsme@stoned:~$
</sessie>
"test.cpp:16: error: `A A::a' is not a static member of `class A'"
Deze foutmelding snap ik dus totaal niet.. anyone? Nuja, ze treedt niet op
als ik die foute regel vervang door de juiste (A vervangen door T<A>).
--
Nicolas Barbier
Technical Details
Message-ID:
<3df655a2$0$3397$afc38c87@sisyphus.news.be.easynet.net>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsfeed.online.be!feed1.news.be.easynet.net!sisyphus.news.be.easynet.net!not-for-mailReferences:
<3df5fa6b$0$20770$ba620e4c@news.skynet.be> <87lm2ykkpg.fsf@appel.kotnet.org> <3df6309c$0$8499$ba620e4c@news.skynet.be> <3df63dab$0$3394$afc38c87@sisyphus.news.be.easynet.net>Show Full Headers
Complete Article Headers
X-Google-Language: DUTCH,ASCII-7-bit X-Google-Thread: fcea4,c436a161484c41f1 X-Google-Attributes: gidfcea4,public X-Google-ArrivalTime: 2002-12-10 12:59:16 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsfeed.online.be!feed1.news.be.easynet.net!sisyphus.news.be.easynet.net!not-for-mail Message-ID: <3df655a2$0$3397$afc38c87@sisyphus.news.be.easynet.net> From: Nicolas Barbier <anti@spam.invalid> Subject: Re: gcc internal compiler error (was: ISO C++ does not permit ...) Newsgroups: be.comp.programming Date: Tue, 10 Dec 2002 21:58:56 +0100 References: <3df5fa6b$0$20770$ba620e4c@news.skynet.be> <87lm2ykkpg.fsf@appel.kotnet.org> <3df6309c$0$8499$ba620e4c@news.skynet.be> <3df63dab$0$3394$afc38c87@sisyphus.news.be.easynet.net> User-Agent: KNode/0.6.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit Lines: 66 Organization: [ posted via Easynet Belgium ] NNTP-Posting-Host: 213.193.183.45 X-Trace: 1039553955 3397 213.193.183.45 X-Complaints-To: abuse@be.easynet.net