diff options
author | Andrew Hsieh <andrewhsieh@google.com> | 2014-06-03 16:22:18 +0800 |
---|---|---|
committer | Andrew Hsieh <andrewhsieh@google.com> | 2014-06-03 16:22:18 +0800 |
commit | b24d8467fc60d67f010601ce8b5c360c8b603cc4 (patch) | |
tree | 8f42f86bda4e914bdb4451d87f4a69133b932849 /gcc-4.6/gcc/cp | |
parent | 8f2898c09773292b6ba523cee7e528a320ff1e02 (diff) | |
download | toolchain_gcc-b24d8467fc60d67f010601ce8b5c360c8b603cc4.tar.gz toolchain_gcc-b24d8467fc60d67f010601ce8b5c360c8b603cc4.tar.bz2 toolchain_gcc-b24d8467fc60d67f010601ce8b5c360c8b603cc4.zip |
[4.6] Backport fix to allow constexpr and const together
2012-07-25 Jason Merrill <jason@redhat.com>
PR c++/54086
* decl.c (grokdeclarator): Allow const and constexpr together.
Change-Id: I6c2dfb287e3e84ad5bf3e5057f994560907367d9
Diffstat (limited to 'gcc-4.6/gcc/cp')
-rw-r--r-- | gcc-4.6/gcc/cp/decl.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/gcc-4.6/gcc/cp/decl.c b/gcc-4.6/gcc/cp/decl.c index 69595a97b..e9713e982 100644 --- a/gcc-4.6/gcc/cp/decl.c +++ b/gcc-4.6/gcc/cp/decl.c @@ -9144,8 +9144,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"); type_quals |= TYPE_QUAL_CONST; |