Marc Glisse
2014-10-08 20:28:32 UTC
Hello,
another tiny bit for C++14 constexpr. I tested it on x86_64-linux-gnu
together with another patch, so I'll retest it alone to be sure, but it
passed. I added 'const' in addition to 'constexpr' for most testcases
where it was needed, except for 2 where I explicitly check that const is
implicit in C++11 but not C++14.
2014-10-09 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.
another tiny bit for C++14 constexpr. I tested it on x86_64-linux-gnu
together with another patch, so I'll retest it alone to be sure, but it
passed. I added 'const' in addition to 'constexpr' for most testcases
where it was needed, except for 2 where I explicitly check that const is
implicit in C++11 but not C++14.
2014-10-09 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.
--
Marc Glisse
Marc Glisse