Created attachment 23635 [details] Example showing the problem Trying to mark a value as don't care using the gcc extension of initializing it with itself triggers an ICE in lookup_parameter_binding.
I guess an ICE is one way to solve the missing diagnostic for PR 18016 ;) 4.5 didn't ICE, but then constexpr was ignored so I'm not sure it counts as a regression
N.B. I don't think there's any GCC extension involving initializing class members with themselves. Doing so is almost certainly a mistake.
Author: jason Date: Thu Mar 17 02:36:29 2011 New Revision: 171086 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=171086 Log: PR c++/48089 * semantics.c (potential_constant_expression_1): Don't allow *this in a constructor. (register_constexpr_fundef): Use potential_rvalue_constant_expression. Added: trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-48089.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/semantics.c trunk/gcc/testsuite/ChangeLog
Fixed for 4.7. Will backport for 4.6.1.
Author: jason Date: Tue Mar 29 18:47:43 2011 New Revision: 171687 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=171687 Log: PR c++/48089 * semantics.c (potential_constant_expression_1): Change error about use of *this in constructor into sorry. Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/semantics.c trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-48089.C
Author: jason Date: Fri May 6 21:58:22 2011 New Revision: 173513 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173513 Log: PR c++/48089 * semantics.c (potential_constant_expression_1): Don't allow *this in a constructor. (register_constexpr_fundef): Use potential_rvalue_constant_expression. Added: branches/gcc-4_6-branch/gcc/testsuite/g++.dg/cpp0x/constexpr-48089.C Modified: branches/gcc-4_6-branch/gcc/cp/ChangeLog branches/gcc-4_6-branch/gcc/cp/semantics.c branches/gcc-4_6-branch/gcc/testsuite/ChangeLog
Fixed for 4.6.1.