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: unassig...@gcc.gnu.org
        ReportedBy: ppluzhni...@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.

Reply via email to