This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/51489] constexpr not working consistently
- 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: Mon, 19 Dec 2011 05:57:58 +0000
- Subject: [Bug c++/51489] constexpr not working consistently
- Auto-submitted: auto-generated
- References: <bug-51489-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51489
--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> 2011-12-19 05:57:58 UTC ---
Author: jason
Date: Mon Dec 19 05:57:52 2011
New Revision: 182470
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182470
Log:
PR c++/51489
* semantics.c (cxx_eval_outermost_constant_expr): Check for
conversion from pointer to integer here.
(cxx_eval_constant_expression) [NOP_EXPR]: Not here.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-ptrsub.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/semantics.c
trunk/gcc/testsuite/ChangeLog