This is the mail archive of the
gcc-cvs@gcc.gnu.org
mailing list for the GCC project.
r187577 - in /branches/google/gcc-4_7/gcc: cp/C...
- From: aaw at gcc dot gnu dot org
- To: gcc-cvs at gcc dot gnu dot org
- Date: Wed, 16 May 2012 01:47:26 -0000
- Subject: r187577 - in /branches/google/gcc-4_7/gcc: cp/C...
Author: aaw
Date: Wed May 16 01:47:25 2012
New Revision: 187577
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=187577
Log:
Allow static const floats unless -pedantic is passed.
This patch allows us to migrate to C++11 more incrementally, since we can leave
the static const float initializations in place, flip the switch, and then
change it to use constexpr.
This is a forward port of r180638 from google/gcc-4_6 (despite the fact that
that revision says to NOT forward-port this). Minor additional fixups have
been applied.
2012-05-15 Ollie Wild <aaw@google.com>
* gcc/cp/decl.c (check_static_variable_definition): Only generate a
constexpr warning when -pedantic is enabled.
* gcc/testsuite/g++.dg/cpp0x/constexpr-static8.C: Replace -fpermissive
with -pedantic.
* gcc/testsuite/g++.dg/cpp0x/constexpr-static8_nonpedantic.C: New test.
* gcc/testsuite/g++.old-deja/g++.ext/memconst.C: Compile with -pedantic
-pedantic-errors to work around test failures with -std=gnu++11.
Added:
branches/google/gcc-4_7/gcc/cp/ChangeLog.google-4_7
branches/google/gcc-4_7/gcc/testsuite/g++.dg/cpp0x/constexpr-static8_nonpedantic.C
Modified:
branches/google/gcc-4_7/gcc/cp/decl.c
branches/google/gcc-4_7/gcc/testsuite/ChangeLog.google-4_7
branches/google/gcc-4_7/gcc/testsuite/g++.dg/cpp0x/constexpr-static8.C
branches/google/gcc-4_7/gcc/testsuite/g++.old-deja/g++.ext/memconst.C