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]

Re: [C++ PATCH, committed] Fix PR9030 (main trunk version)


Mark Mitchell wrote:


For testcase #2, parser->scope is a non-template class (the
TEMPLATE_INFO is missing).
For testcase #3, parser->scope is NULL_TREE.

I'm assuming this one is testcase #2:

-------------------------------
class O {
   struct I { I (int); };

   template <class T_>
   friend typename O::I f ();;
};

template <class T_>
typename O::I f () { return 1; };

struct X {
   void g() { f<int>(); }
};
-------------------------------

Here, there is no TEAMPLATE_INFO because O is not a template class.

Well, that was brain fart :)  I thought it was something like O<T_>.
I know what's wrong with it.  The parser doesn't call make_typename_type
with tf_parsing flag which does the defer access checking.  And the
defer access checking mechanism isn't updated to use the new one either.
I'll take care of this problem and will submit a patch for consideration.

Sorry for my confusion.

--Kriang






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