diff options
author | Marek Polacek <polacek@redhat.com> | 2016-01-19 14:02:40 +0000 |
---|---|---|
committer | Marek Polacek <mpolacek@gcc.gnu.org> | 2016-01-19 14:02:40 +0000 |
commit | 1e2970064a996338c20f55b4b900ac678d0ceb94 (patch) | |
tree | decf75e7e87bfbaae21783d477ba29dfa48b91bb /gcc/cp/cp-gimplify.c | |
parent | c8012fbce973bebc5cf2a9905ebfa9fbaec1afa0 (diff) | |
download | gcc-1e2970064a996338c20f55b4b900ac678d0ceb94.zip gcc-1e2970064a996338c20f55b4b900ac678d0ceb94.tar.gz gcc-1e2970064a996338c20f55b4b900ac678d0ceb94.tar.bz2 |
re PR c++/68586 (Enum template parameter wrongly rejected)
PR c++/68586
* constexpr.c (clear_cv_cache): New.
* cp-gimplify.c (clear_fold_cache): New.
* cp-tree.h (clear_cv_cache, clear_fold_cache): Declare.
* decl.c (finish_enum_value_list): Call them.
* g++.dg/cpp0x/enum30.C: New test.
From-SVN: r232562
Diffstat (limited to 'gcc/cp/cp-gimplify.c')
-rw-r--r-- | gcc/cp/cp-gimplify.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/cp/cp-gimplify.c b/gcc/cp/cp-gimplify.c index 5c4d3c1..3f96901 100644 --- a/gcc/cp/cp-gimplify.c +++ b/gcc/cp/cp-gimplify.c @@ -1896,6 +1896,14 @@ c_fully_fold (tree x, bool /*in_init*/, bool */*maybe_const*/) static GTY((cache, deletable)) cache_map fold_cache; +/* Dispose of the whole FOLD_CACHE. */ + +void +clear_fold_cache (void) +{ + gt_cleare_cache (fold_cache); +} + /* This function tries to fold an expression X. To avoid combinatorial explosion, folding results are kept in fold_cache. If we are processing a template or X is invalid, we don't fold at all. |