aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2000-11-21 11:09:38 -0800
committerRichard Henderson <rth@gcc.gnu.org>2000-11-21 11:09:38 -0800
commit3fe30ff6f7652648c0c2882815ad2f52e51c06db (patch)
tree7b19327f6425471460eda074c9f38f18c4323d1a /gcc/tree.c
parent3adbce3d89170e4c84697de5c71d5486b029f26f (diff)
downloadgcc-3fe30ff6f7652648c0c2882815ad2f52e51c06db.zip
gcc-3fe30ff6f7652648c0c2882815ad2f52e51c06db.tar.gz
gcc-3fe30ff6f7652648c0c2882815ad2f52e51c06db.tar.bz2
c-common.c (c_unsafe_for_reeval): New function.
* c-common.c (c_unsafe_for_reeval): New function. (add_c_tree_codes): Register it. * c-common.h: Declare it. * tree.c (lang_unsafe_for_reeval): New hook. (unsafe_for_reeval): Call it. * tree.h: Declare it. From-SVN: r37623
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 7910449..dcacdaf 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -179,6 +179,9 @@ static void finish_vector_type PARAMS((tree));
void (*lang_unsave) PARAMS ((tree *));
void (*lang_unsave_expr_now) PARAMS ((tree));
+/* If non-null, these are language-specific helper functions for
+ unsafe_for_reeval. Return negative to not handle some tree. */
+int (*lang_unsafe_for_reeval) PARAMS ((tree));
tree global_trees[TI_MAX];
tree integer_types[itk_none];
@@ -1778,7 +1781,12 @@ unsafe_for_reeval (expr)
break;
default:
- /* ??? Add a lang hook if it becomes necessary. */
+ if (lang_unsafe_for_reeval != 0)
+ {
+ tmp = (*lang_unsafe_for_reeval) (expr);
+ if (tmp >= 0)
+ return tmp;
+ }
break;
}