From b24d8467fc60d67f010601ce8b5c360c8b603cc4 Mon Sep 17 00:00:00 2001 From: Andrew Hsieh Date: Tue, 3 Jun 2014 16:22:18 +0800 Subject: [4.6] Backport fix to allow constexpr and const together 2012-07-25 Jason Merrill PR c++/54086 * decl.c (grokdeclarator): Allow const and constexpr together. Change-Id: I6c2dfb287e3e84ad5bf3e5057f994560907367d9 --- gcc-4.6/gcc/cp/decl.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'gcc-4.6') 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 % and % cannot be used here"); if (type_quals & TYPE_QUAL_VOLATILE) error ("both % and % cannot be used here"); type_quals |= TYPE_QUAL_CONST; -- cgit v1.2.3