This is the mail archive of the 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]
Other format: [Raw text]

[Bug c++/11107] Crash on template member call / static data member inititalization


           What    |Removed                     |Added
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE

------- Additional Comments From  2003-06-06 02:13 -------
This is a known bug, with several duplicates (for example 8206).
It is "fixed" in 3.3 and 3.4, i.e. the ICE doesn't happen any 
more, but the error message is not overly helpful:

g/x> /home/bangerth/bin/gcc-3.3-pre/bin/c++ -c error: ISO C++ forbids defining types within return type error: `void (Factory<Method>::)(TCreator<Method>*)' is not an
   aggregate type error: syntax error before `::' token

g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c error: expected init-declarator error: expected `,' or `;'

This not-so-helpful error message is treated elsewhere. The reason for
this weird message stems from the fact that C++ allows this abomination:
    class Method {} foo ();
    Method foo ()  { return Method(); }

So gcc thinks in your code that the big structure denotes the return
type of a function -- which turns out to be a constructor, which can
now have a return type. That's how gcc3.3's message needs to be read.
Now, present mainline is not so easy to interpret...


*** This bug has been marked as a duplicate of 8206 ***

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

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