lex.c (yyprint): Handle PFUNCNAME.

* lex.c (yyprint): Handle PFUNCNAME.

	* decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
	build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.

From-SVN: r28467
This commit is contained in:
Jason Merrill 1999-08-03 10:18:13 +00:00 committed by Jason Merrill
parent 778e067718
commit 074917ba5c
4 changed files with 13 additions and 3 deletions

View File

@ -1,3 +1,10 @@
1999-08-03 Jason Merrill <jason@yorick.cygnus.com>
* lex.c (yyprint): Handle PFUNCNAME.
* decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
1999-08-03 Mumit Khan <khan@xraylith.wisc.edu>
* decl.c (start_decl): Set attributes before duplicate_decls call.

View File

@ -4146,7 +4146,7 @@ build_new_method_call (instance, name, args, basetype_path, flags)
name = TREE_OPERAND (name, 0);
if (TREE_CODE_CLASS (TREE_CODE (name)) == 'd')
name = DECL_NAME (name);
else
else
{
if (TREE_CODE (name) == COMPONENT_REF)
name = TREE_OPERAND (name, 1);

View File

@ -3996,7 +3996,7 @@ build_expr_from_tree (t)
else
{
tree fn = TREE_OPERAND (t, 0);
/* We can get a TEMPLATE_ID_EXPR here on code like:
x->f<2>();
@ -4007,7 +4007,9 @@ build_expr_from_tree (t)
build_expr_from_tree. So, just use build_expr_from_tree
when we really need it. */
if (TREE_CODE (fn) == TEMPLATE_ID_EXPR)
fn = build_expr_from_tree (fn);
fn = lookup_template_function
(TREE_OPERAND (fn, 0),
build_expr_from_tree (TREE_OPERAND (fn, 1)));
return build_method_call
(build_expr_from_tree (TREE_OPERAND (t, 1)),

View File

@ -908,6 +908,7 @@ yyprint (file, yychar, yylval)
case TYPENAME:
case TYPESPEC:
case PTYPENAME:
case PFUNCNAME:
case IDENTIFIER_DEFN:
case TYPENAME_DEFN:
case PTYPENAME_DEFN: