aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.6
diff options
context:
space:
mode:
authorAndrew Hsieh <andrewhsieh@google.com>2014-06-03 16:22:18 +0800
committerAndrew Hsieh <andrewhsieh@google.com>2014-06-03 16:22:18 +0800
commitb24d8467fc60d67f010601ce8b5c360c8b603cc4 (patch)
tree8f42f86bda4e914bdb4451d87f4a69133b932849 /gcc-4.6
parent8f2898c09773292b6ba523cee7e528a320ff1e02 (diff)
downloadtoolchain_gcc-b24d8467fc60d67f010601ce8b5c360c8b603cc4.zip
toolchain_gcc-b24d8467fc60d67f010601ce8b5c360c8b603cc4.tar.gz
toolchain_gcc-b24d8467fc60d67f010601ce8b5c360c8b603cc4.tar.bz2
[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')
-rw-r--r--gcc-4.6/gcc/cp/decl.c2
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 69595a9..e9713e9 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;