]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
lex.c (yyprint): Handle PFUNCNAME.
authorJason Merrill <jason@yorick.cygnus.com>
Tue, 3 Aug 1999 10:18:13 +0000 (10:18 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Tue, 3 Aug 1999 10:18:13 +0000 (06:18 -0400)
* 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

gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/decl2.c
gcc/cp/lex.c

index a52ccf076a1990daee3363a870b954020f218c65..5232c7288599dee1d7713c108c7752cbb79c8af9 100644 (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.
index f9288a43541f17ae2029921219a062473f217d42..9cdfc75c88163267b4b69041f5a303424b9cb13d 100644 (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);
index cbc6c23eb9d498eaecaf488c3b1380c8a94931fd..a841319d233eb740c0d204961cdc7d1bb3a0bb07 100644 (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)),
index f9fc681c05b0d63ffb89cb23c551d6e307bd3ffa..1bcb667b092e747db00f4da755040f69b2b0c1bb 100644 (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: