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++/56272] New: Poor diagnostics for error: specialization of ... after instantiation


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

             Bug #: 56272
           Summary: Poor diagnostics for error: specialization of ...
                    after instantiation
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: ppluzhnikov@google.com


Test case:

template <typename T> class A
{
    void Invert ()
    {
        A < double >a;
    }
};

template class A<double>;

template <> void A < double >::Invert ();



g++ -c t.ii
t.ii:11:40: error: specialization of âvoid A<T>::Invert() [with T = double]â
after instantiation

Yes, but where was instantiation triggered?

In this reduced test case, it's obvious, but in a real test case I have 2MB of
text, the code builds fine with gcc-4.7, and the instantiation point is nowhere
to be seen.


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