aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/treelang/ChangeLog5
-rw-r--r--gcc/treelang/parse.y4
-rw-r--r--gcc/treelang/treetree.c9
3 files changed, 11 insertions, 7 deletions
diff --git a/gcc/treelang/ChangeLog b/gcc/treelang/ChangeLog
index 4932225..a0192f7 100644
--- a/gcc/treelang/ChangeLog
+++ b/gcc/treelang/ChangeLog
@@ -1,3 +1,8 @@
+2005-06-15 James A. Morrison <phython@gcc.gnu.org>
+
+ * parse.y (function_invocation): Reverse parameter list.
+ * treetree.c (tree_code_get_expression): Don't reverse parameter list.
+
2005-06-12 Rafael ?vila de Esp?ndola <rafael.espindola@gmail.com>
* treetree.c (tree_code_get_expression): Call build_function_call_expr
diff --git a/gcc/treelang/parse.y b/gcc/treelang/parse.y
index fe1d9b1..5e4fd74 100644
--- a/gcc/treelang/parse.y
+++ b/gcc/treelang/parse.y
@@ -40,6 +40,7 @@ the GCC compiler. */
#include "coretypes.h"
#include "tm.h"
#include "timevar.h"
+#include "tree.h"
#include "treelang.h"
#include "treetree.h"
@@ -675,7 +676,8 @@ NAME LEFT_PARENTHESIS expressions_with_commas_opt RIGHT_PARENTHESIS {
}
type = tree_code_get_type (NUMERIC_TYPE (prod));
prod->tp.pro.code = tree_code_get_expression (EXP_FUNCTION_INVOCATION, type,
- proto->tp.pro.code, parms,
+ proto->tp.pro.code,
+ nreverse (parms),
NULL, tok->tp.tok.location);
$$ = prod;
}
diff --git a/gcc/treelang/treetree.c b/gcc/treelang/treetree.c
index 90e1679..7ee707f 100644
--- a/gcc/treelang/treetree.c
+++ b/gcc/treelang/treetree.c
@@ -698,12 +698,9 @@ tree_code_get_expression (unsigned int exp_type,
case EXP_FUNCTION_INVOCATION:
gcc_assert (op1);
- {
- TREE_USED (op1) = 1;
- gcc_assert(TREE_TYPE (TREE_TYPE (op1)) == type);
- tree arglist = nreverse(op2);
- ret1 = build_function_call_expr(op1, arglist);
- }
+ gcc_assert(TREE_TYPE (TREE_TYPE (op1)) == type);
+ TREE_USED (op1) = 1;
+ ret1 = build_function_call_expr(op1, op2);
break;
default: