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/constexpr.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/constexpr.c')
-rw-r--r-- | gcc/cp/constexpr.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c index 6ab4696..6b0e5a8 100644 --- a/gcc/cp/constexpr.c +++ b/gcc/cp/constexpr.c @@ -4027,6 +4027,14 @@ maybe_constant_value (tree t, tree decl) return ret; } +/* Dispose of the whole CV_CACHE. */ + +void +clear_cv_cache (void) +{ + gt_cleare_cache (cv_cache); +} + /* Like maybe_constant_value but first fully instantiate the argument. Note: this is equivalent to instantiate_non_dependent_expr_sfinae |