diff options
author | Joseph Myers <joseph@codesourcery.com> | 2005-07-05 17:50:24 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2005-07-05 17:50:24 +0000 |
commit | 6d32ec0fa90be9fc426e2d942fa1a8f8aaa28f4e (patch) | |
tree | 577db0c08701372c3b91ab562c53ebd97999043a /gcc/c-tree.h | |
parent | 34c37f07ce68556b4741b60b937f5dc92a355c8f (diff) |
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: https://gcc.gnu.org/svn/gcc/trunk@101630 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-tree.h')
-rw-r--r-- | gcc/c-tree.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/c-tree.h b/gcc/c-tree.h index 4cf6fa7c3ef..3266ceccbdf 100644 --- a/gcc/c-tree.h +++ b/gcc/c-tree.h @@ -573,6 +573,7 @@ extern tree c_finish_goto_label (tree); extern tree c_finish_goto_ptr (tree); extern void c_begin_vm_scope (unsigned int); extern void c_end_vm_scope (unsigned int); +extern tree c_expr_to_decl (tree, bool *, bool *, bool *); /* Set to 0 at beginning of a function definition, set to 1 if a return statement that specifies a return value is seen. */ |