decl.c (grokdeclarator): constexpr only implies const in C++11.
authorMarc Glisse <marc.glisse@inria.fr>
Thu, 9 Oct 2014 13:53:54 +0000 (15:53 +0200)
committerMarc Glisse <glisse@gcc.gnu.org>
Thu, 9 Oct 2014 13:53:54 +0000 (13:53 +0000)
commitd0ff1cb4d9b1972e0aa9535d77413e12c4e84fa2
tree86be65ec8d99fa07ac9f9ddf60af5bb0015932c7
parent12d3031b2c31ad7c9ec956eba52f8451f7b284aa
decl.c (grokdeclarator): constexpr only implies const in C++11.

2014-10-09  Marc Glisse  <marc.glisse@inria.fr>

gcc/cp/
* decl.c (grokdeclarator): constexpr only implies const in C++11.
gcc/testsuite/
* g++.dg/cpp0x/constexpr-52892-1.C: Error on missing const in C++14.
* g++.dg/cpp0x/constexpr-array-ptr7.C: Likewise.
* g++.dg/cpp0x/constexpr-diag1.C: Add const.
* g++.dg/cpp0x/constexpr-diag3.C: Likewise.
* g++.dg/cpp0x/constexpr-ex1.C: Likewise.
* g++.dg/cpp0x/constexpr-ex2.C: Likewise.
* g++.dg/cpp0x/constexpr-ex4.C: Likewise.
* g++.dg/cpp0x/constexpr-initlist.C: Likewise.
* g++.dg/cpp0x/constexpr-ptrmem.C: Likewise.
* g++.dg/cpp0x/constexpr-ptrsub.C: Likewise.
* g++.dg/cpp0x/constexpr-ref4.C: Likewise.
* g++.dg/cpp0x/constexpr-static6.C: Likewise.

From-SVN: r216039
15 files changed:
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/constexpr-52892-1.C
gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr7.C
gcc/testsuite/g++.dg/cpp0x/constexpr-diag1.C
gcc/testsuite/g++.dg/cpp0x/constexpr-diag3.C
gcc/testsuite/g++.dg/cpp0x/constexpr-ex1.C
gcc/testsuite/g++.dg/cpp0x/constexpr-ex2.C
gcc/testsuite/g++.dg/cpp0x/constexpr-ex4.C
gcc/testsuite/g++.dg/cpp0x/constexpr-initlist.C
gcc/testsuite/g++.dg/cpp0x/constexpr-ptrmem.C
gcc/testsuite/g++.dg/cpp0x/constexpr-ptrsub.C
gcc/testsuite/g++.dg/cpp0x/constexpr-ref4.C
gcc/testsuite/g++.dg/cpp0x/constexpr-static6.C