diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1994-12-21 12:50:57 -0500 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1994-12-21 12:50:57 -0500 |
commit | b6ec8c5f7538fb75c01dc5e126bf69118e88ec91 (patch) | |
tree | 99f84544d0e3578340d98d6050d1a1fb5b80ddeb | |
parent | e24b00c81a1fe3e5031393e337b679aec706432c (diff) | |
download | gcc-b6ec8c5f7538fb75c01dc5e126bf69118e88ec91.zip gcc-b6ec8c5f7538fb75c01dc5e126bf69118e88ec91.tar.gz gcc-b6ec8c5f7538fb75c01dc5e126bf69118e88ec91.tar.bz2 |
(expand_expr_stmt): If want values for statements, convert function to
address-of-function.
From-SVN: r8679
-rw-r--r-- | gcc/stmt.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -1621,6 +1621,12 @@ expand_expr_stmt (exp) else if (warn_unused) warn_if_unused_value (exp); } + + /* If EXP is of function type and we are expanding statements for + value, convert it to pointer-to-function. */ + if (expr_stmts_for_value && TREE_CODE (TREE_TYPE (exp)) == FUNCTION_TYPE) + exp = build1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (exp)), exp); + last_expr_type = TREE_TYPE (exp); if (! flag_syntax_only) last_expr_value = expand_expr (exp, |