]> gcc.gnu.org Git - gcc.git/commitdiff
decl2.c (build_expr_from_tree, [...]): Build explicit TEMPLATE_ID_EXPR args.
authorNathan Sidwell <nathan@codesourcery.com>
Fri, 11 Aug 2000 09:28:01 +0000 (09:28 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Fri, 11 Aug 2000 09:28:01 +0000 (09:28 +0000)
* decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
explicit TEMPLATE_ID_EXPR args.
(build_expr_from_tree, case CALL_EXPR): Likewise.

From-SVN: r35629

gcc/cp/ChangeLog
gcc/cp/decl2.c

index ab9264e899a6333386d4d8a46603ae2f24138b00..985716935e386a71fd26bbb9b291dff66f811a7f 100644 (file)
@@ -1,3 +1,9 @@
+2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
+       explicit TEMPLATE_ID_EXPR args.
+       (build_expr_from_tree, case CALL_EXPR): Likewise.
+
 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
 
        * decl.c (check_tag_decl): Diagnose typename's which don't
index cf1feb606e9febadbc576e26f682b8659a93cee8..c968bcb2b04d14df532eccd6831f5bb8d16b2b0d 100644 (file)
@@ -4116,10 +4116,17 @@ build_expr_from_tree (t)
       if (TREE_CODE (TREE_OPERAND (t, 0)) == SCOPE_REF)
        {
          tree ref = TREE_OPERAND (t, 0);
+         tree name = TREE_OPERAND (ref, 1);
+         
+         if (TREE_CODE (name) == TEMPLATE_ID_EXPR)
+           name = build_nt (TEMPLATE_ID_EXPR,
+                            TREE_OPERAND (name, 0),
+                            build_expr_from_tree (TREE_OPERAND (name, 1)));
+           
          return build_scoped_method_call
            (build_expr_from_tree (TREE_OPERAND (t, 1)),
             build_expr_from_tree (TREE_OPERAND (ref, 0)),
-            TREE_OPERAND (ref, 1),
+            name,
             build_expr_from_tree (TREE_OPERAND (t, 2)));
        }
       else 
@@ -4151,9 +4158,16 @@ build_expr_from_tree (t)
       if (TREE_CODE (TREE_OPERAND (t, 0)) == SCOPE_REF)
        {
          tree ref = TREE_OPERAND (t, 0);
+         tree name = TREE_OPERAND (ref, 1);
+         
+         if (TREE_CODE (name) == TEMPLATE_ID_EXPR)
+           name = build_nt (TEMPLATE_ID_EXPR,
+                            TREE_OPERAND (name, 0),
+                            build_expr_from_tree (TREE_OPERAND (name, 1)));
+           
          return build_member_call
            (build_expr_from_tree (TREE_OPERAND (ref, 0)),
-            TREE_OPERAND (ref, 1),
+            name,
             build_expr_from_tree (TREE_OPERAND (t, 1)));
        }
       else
This page took 0.076583 seconds and 5 git commands to generate.