diff options
author | Richard Henderson <rth@redhat.com> | 2000-11-21 11:09:38 -0800 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2000-11-21 11:09:38 -0800 |
commit | 3fe30ff6f7652648c0c2882815ad2f52e51c06db (patch) | |
tree | 7b19327f6425471460eda074c9f38f18c4323d1a /gcc/tree.c | |
parent | 3adbce3d89170e4c84697de5c71d5486b029f26f (diff) | |
download | gcc-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.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -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; } |