This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: c++/4286


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]