This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/4286
- To: rosbacke at nada dot kth dot se, gcc-gnats at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org
- Subject: Re: c++/4286
- From: Reichelt <reichelt at igpm dot rwth-aachen dot de>
- Date: Tue, 11 Sep 2001 12:32:13 +0200
Hi,
although the original example is ill-formed (the closing brace
of the body of the function "findClusters" is missing) one can
construct a shorter well-formed example that exhibits the same
behaviour (so it's an ice-on-legal):
struct A
{
template<class T> void f();
};
template<class T> void A::f()
{
struct B
{
void g() {}
static int x;
};
}
It crashes gcc 3.0 and the 20010903 snapshot of 3.0.2 on
an i686-pc-linux-gnu and a mips-sgi-irix6.5 system.
Just use "g++ -c" without any further options.
By the way, the bug is a regression from 2.95.3.
Greetings,
Volker Reichelt
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=4286&database=gcc