PR c++/55137
commit4326a074cb25bc92685b22c6e432a40f4610ef37
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 22 Nov 2012 14:42:00 +0000 (22 14:42 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 22 Nov 2012 14:42:00 +0000 (22 14:42 +0000)
tree9c24e24f889471d133a7807f725c04c202a351bc
parent6eeebe5ce3ac68a1b5d21afb2400b5ccb044c634
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193727 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/semantics.c
gcc/testsuite/g++.dg/init/static-init3.C [new file with mode: 0644]