This is the mail archive of the gcc-patches@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]

C++ PATCH for c++/71515 (typename in partial specialization)


Here we got into infinite recursion trying to determine if A<int> is
the same as A<T, typename A<T>::type> because we would keep trying to
resolve the typename, which would want to compare the types again to
see if A<T> is a currently open class, and so on.

This patch avoids this recursion by checking whether the typename
scope has TYPE_FIELDS set before we bother to see if it's a currently
open class; if TYPE_FIELDS isn't set then this particular dependent
template-id has not been defined as a partial specialization anywhere,
so there's no point in checking to see if it matches one of the
currently open classes.

Tested x86_64-pc-linux-gnu, applying to trunk.

Attachment: 71515.diff
Description: Text document


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