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 PR12924 (TEMPLATE_ID_EXPR handlingin finish_class_member_access_expr)


Gabriel Dos Reis wrote:
Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> writes:

| Hi
| | This obvious patch fix the ICE PR12924 which is a regression in GCC 3.4.
| We simply forget to deal with TEMPLATE_ID_EXPR that has OVERLOAD,
| TEMPLATE_DECL, as its first operand besides IDENTIFIER_NODE.


I think the documentation says somewhere that the first operand is an
IDENTIFIER_NODE.

-- Gaby


I don't think so. Here is the piece of comment from cp-tree.def, which should be the most up-to-date compare to other documentations:

/* A template-id, like foo<int>.  The first operand is the template.
   The second is NULL if there are no explicit arguments, or a
   TREE_VEC of arguments.  The template will be a FUNCTION_DECL,
   TEMPLATE_DECL, or an OVERLOAD.  If the template-id refers to a
   member template, the template may be an IDENTIFIER_NODE.  */

Note that there is still some problem deciding whether the scope of
a template-id is template parameter dependent (like PR11814) in GCC now.
Ideally, the first operand is IDENTIFIER_NODE only when the scope is
dependent and *_DECL or OVERLOAD otherwise.

--Kriang



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