diff options
author | Jason Merrill <jason@redhat.com> | 2015-12-02 14:04:38 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2015-12-02 14:04:38 -0500 |
commit | 4250754eea1c10c88f49c9f11b9f912f992b7c42 (patch) | |
tree | 08c85cdc811c8da6f75b43930fc94de70352d1ab /gcc/cp | |
parent | e9ea372d08324b38acbc7234e803f8f128c439b8 (diff) | |
download | gcc-4250754eea1c10c88f49c9f11b9f912f992b7c42.zip gcc-4250754eea1c10c88f49c9f11b9f912f992b7c42.tar.gz gcc-4250754eea1c10c88f49c9f11b9f912f992b7c42.tar.bz2 |
Define c_fully_fold separately for C and C++.
gcc/c-family/
* c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
(c_fully_fold_internal, decl_constant_value_for_optimization):
Move to c/c-fold.c.
* c-common.h: Don't declare decl_constant_value_for_optimization.
gcc/c/
* c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
(c_fully_fold_internal, decl_constant_value_for_optimization):
Move from c-common.c.
* c-tree.h: Declare decl_constant_value_for_optimization.
* Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
gcc/cp/
* cp-gimplify.c (c_fully_fold): Define.
From-SVN: r231196
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 2 | ||||
-rw-r--r-- | gcc/cp/cp-gimplify.c | 11 |
2 files changed, 13 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 259c312..2f406bc 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,7 @@ 2015-12-02 Jason Merrill <jason@redhat.com> + * cp-gimplify.c (c_fully_fold): Define. + * cp-gimplify.c (cp_fold): Use fold_build*. 2015-12-02 Joseph Myers <joseph@codesourcery.com> diff --git a/gcc/cp/cp-gimplify.c b/gcc/cp/cp-gimplify.c index 86fef9e..2c54d85 100644 --- a/gcc/cp/cp-gimplify.c +++ b/gcc/cp/cp-gimplify.c @@ -1883,6 +1883,17 @@ cp_fully_fold (tree x) return cp_fold (x); } +/* c-common interface to cp_fold. If IN_INIT, this is in a static initializer + and certain changes are made to the folding done. Or should be (FIXME). We + never touch maybe_const, as it is only used for the C front-end + C_MAYBE_CONST_EXPR. */ + +tree +c_fully_fold (tree x, bool /*in_init*/, bool */*maybe_const*/) +{ + return cp_fold (x); +} + static GTY((cache, deletable)) cache_map fold_cache; /* This function tries to fold an expression X. |