summaryrefslogtreecommitdiff
path: root/gcc/langhooks-def.h
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2005-07-05 17:50:24 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2005-07-05 17:50:24 +0000
commit54d7165ad45f762419fd1509ba6576733d172456 (patch)
tree577db0c08701372c3b91ab562c53ebd97999043a /gcc/langhooks-def.h
parentd8828f5588041b10e148608e265e4fcc54e05f7c (diff)
downloadgcc-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/langhooks-def.h')
-rw-r--r--gcc/langhooks-def.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/langhooks-def.h b/gcc/langhooks-def.h
index 2c8bb963198..cd9a98e6479 100644
--- a/gcc/langhooks-def.h
+++ b/gcc/langhooks-def.h
@@ -69,6 +69,7 @@ extern const char *lhd_comdat_group (tree);
extern tree lhd_expr_size (tree);
extern size_t lhd_tree_size (enum tree_code);
extern HOST_WIDE_INT lhd_to_target_charset (HOST_WIDE_INT);
+extern tree lhd_expr_to_decl (tree, bool *, bool *, bool *);
/* Declarations of default tree inlining hooks. */
extern tree lhd_tree_inlining_walk_subtrees (tree *, int *, walk_tree_fn,
@@ -123,6 +124,7 @@ extern int lhd_gimplify_expr (tree *, tree *, tree *);
#define LANG_HOOKS_TREE_SIZE lhd_tree_size
#define LANG_HOOKS_TYPES_COMPATIBLE_P lhd_types_compatible_p
#define LANG_HOOKS_BUILTIN_FUNCTION builtin_function
+#define LANG_HOOKS_EXPR_TO_DECL lhd_expr_to_decl
#define LANG_HOOKS_TO_TARGET_CHARSET lhd_to_target_charset
#define LANG_HOOKS_FUNCTION_INIT lhd_do_nothing_f
@@ -299,6 +301,7 @@ extern tree lhd_make_node (enum tree_code);
LANG_HOOKS_GIMPLIFY_EXPR, \
LANG_HOOKS_FOLD_OBJ_TYPE_REF, \
LANG_HOOKS_BUILTIN_FUNCTION, \
+ LANG_HOOKS_EXPR_TO_DECL, \
}
#endif /* GCC_LANG_HOOKS_DEF_H */