diff options
author | Jason Merrill <jason@redhat.com> | 2012-07-25 10:57:06 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2012-07-25 10:57:06 -0400 |
commit | 452ed9e73bfdc6b08003cd0f79c8df8bd7af5b1d (patch) | |
tree | 91d7df58abad71242d425eb5c528ecae150c113f /gcc/cp | |
parent | 9155a6ddc40af0eed7079eac318e6dd864dcdbc9 (diff) | |
download | gcc-452ed9e73bfdc6b08003cd0f79c8df8bd7af5b1d.zip gcc-452ed9e73bfdc6b08003cd0f79c8df8bd7af5b1d.tar.gz gcc-452ed9e73bfdc6b08003cd0f79c8df8bd7af5b1d.tar.bz2 |
re PR c++/54086 (GCC should allow constexpr and const together)
PR c++/54086
* decl.c (grokdeclarator): Allow const and constexpr together.
From-SVN: r189852
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/cp/decl.c | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index f5fbb5c..409e64d 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2012-07-25 Jason Merrill <jason@redhat.com> + PR c++/54086 + * decl.c (grokdeclarator): Allow const and constexpr together. + PR c++/54020 * semantics.c (potential_constant_expression_1) [COND_EXPR]: Call maybe_constant_value. diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index c37787b..047b2fe 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -9528,8 +9528,6 @@ grokdeclarator (const cp_declarator *declarator, the object as `const'. */ if (constexpr_p && innermost_code != cdk_function) { - if (type_quals & TYPE_QUAL_CONST) - error ("both %<const%> and %<constexpr%> cannot be used here"); if (type_quals & TYPE_QUAL_VOLATILE) error ("both %<volatile%> and %<constexpr%> cannot be used here"); if (TREE_CODE (type) != REFERENCE_TYPE) |