diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-07-05 17:50:24 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-07-05 17:50:24 +0000 |
commit | 54d7165ad45f762419fd1509ba6576733d172456 (patch) | |
tree | 577db0c08701372c3b91ab562c53ebd97999043a /gcc/c-objc-common.h | |
parent | d8828f5588041b10e148608e265e4fcc54e05f7c (diff) | |
download | gcc-54d7165ad45f762419fd1509ba6576733d172456.tar.gz |
PR c/22013
PR c/22098
* langhooks.h (struct lang_hooks): Add expr_to_decl.
* langhooks.c (lhd_expr_to_decl): New.
* langhooks-def.h (lhd_expr_to_decl, LANG_HOOKS_EXPR_TO_DECL):
New.
(LANG_HOOKS_INITIALIZER): Update.
* tree.c (recompute_tree_invarant_for_addr_expr): Call
expr_to_decl langhook.
* c-tree.h (c_expr_to_decl): Declare.
* c-typeck.c (c_expr_to_decl): New.
(build_unary_op): Do not handle ADDR_EXPR of COMPOUND_LITERAL_EXPR
specially.
* c-objc-common.h (LANG_HOOKS_EXPR_TO_DECL): Define.
testsuite:
* gcc.c-torture/compile/pr22013-1.c,
gcc.c-torture/execute/pr22098-1.c,
gcc.c-torture/execute/pr22098-2.c,
gcc.c-torture/execute/pr22098-3.c: New tests.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101630 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-objc-common.h')
-rw-r--r-- | gcc/c-objc-common.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/c-objc-common.h b/gcc/c-objc-common.h index d74273cf935..69212599612 100644 --- a/gcc/c-objc-common.h +++ b/gcc/c-objc-common.h @@ -117,6 +117,8 @@ extern void c_initialize_diagnostics (diagnostic_context *); #define LANG_HOOKS_REGISTER_BUILTIN_TYPE c_register_builtin_type #undef LANG_HOOKS_TO_TARGET_CHARSET #define LANG_HOOKS_TO_TARGET_CHARSET c_common_to_target_charset +#undef LANG_HOOKS_EXPR_TO_DECL +#define LANG_HOOKS_EXPR_TO_DECL c_expr_to_decl /* The C front end's scoping structure is very different from that expected by the language-independent code; it is best |