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]
Other format: [Raw text]

[Bug c++/28058] [4.1/4.2 regression] ICE in inline_forbidden_p



------- Comment #5 from reichelt at gcc dot gnu dot org  2006-07-12 16:39 -------
Here's a testcase that crashes even at -O0 since GCC 4.1.0:

===========================
template<int> struct A
{
    A() {}
};

A<0> a;

template<> A<0>::A() {}
===========================

As Wolfgang already mentioned: explicit specializations must be declared
before they are first used.
However, no diagnostic is required. (Which indicates that such situations
are hard to detect reliably.)


-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |reichelt at gcc dot gnu dot
                   |                            |org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28058


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