This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/55137] [4.8 Regression] Unexpected static structure initialization
- From: "jason at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 22 Nov 2012 14:42:06 +0000
- Subject: [Bug c++/55137] [4.8 Regression] Unexpected static structure initialization
- Auto-submitted: auto-generated
- References: <bug-55137-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55137
--- Comment #12 from Jason Merrill <jason at gcc dot gnu.org> 2012-11-22 14:42:06 UTC ---
Author: jason
Date: Thu Nov 22 14:42:00 2012
New Revision: 193727
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=193727
Log:
PR c++/55137
* semantics.c (verify_constant): Track overflow separately.
(reduced_constant_expression_p): Don't check it here.
(cxx_eval_constant_expression): Check it on CSTs.
(cxx_eval_outermost_constant_expr): Treat overflows as non-constant
at this point, but still return the folded version.
(potential_constant_expression_1): Don't check overflow.
Added:
trunk/gcc/testsuite/g++.dg/init/static-init3.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/semantics.c