diff options
author | phython <phython@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-06-15 21:39:36 +0000 |
---|---|---|
committer | phython <phython@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-06-15 21:39:36 +0000 |
commit | f8456fbcc206727253b9d4c7c3891c6401f72bc8 (patch) | |
tree | 3b6ddcddd1b33bbbf01e785916130d2d9639bb12 /gcc/treelang | |
parent | 1c2711243b68bceb1438c1b1067a2d593f7bca43 (diff) | |
download | gcc-f8456fbcc206727253b9d4c7c3891c6401f72bc8.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100998 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/treelang')
-rw-r--r-- | gcc/treelang/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/treelang/parse.y | 4 | ||||
-rw-r--r-- | gcc/treelang/treetree.c | 9 |
3 files changed, 11 insertions, 7 deletions
diff --git a/gcc/treelang/ChangeLog b/gcc/treelang/ChangeLog index 4932225cf75..a0192f7ce18 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 fe1d9b16207..5e4fd74d086 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 90e1679b829..7ee707ff943 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: |