From 1a2887689b95dd72960b429650eb2b4c0b1fdcd0 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Tue, 14 May 2013 08:49:08 -0400 Subject: re PR c++/56998 (ICE in value_dependent_expression_p, at cp/pt.c:19598) PR c++/56998 * semantics.c (potential_constant_expression_1): Make sure the called function is potentially constant. * call.c (null_ptr_cst_p): Revert earlier change. From-SVN: r198881 --- gcc/cp/call.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/cp/call.c') diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 9f3a50d..bd8f531 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -554,7 +554,7 @@ null_ptr_cst_p (tree t) if (CP_INTEGRAL_TYPE_P (TREE_TYPE (t))) { /* Core issue 903 says only literal 0 is a null pointer constant. */ - if (cxx_dialect < cxx0x && !TREE_SIDE_EFFECTS (t)) + if (cxx_dialect < cxx0x) t = maybe_constant_value (fold_non_dependent_expr_sfinae (t, tf_none)); STRIP_NOPS (t); if (integer_zerop (t) && !TREE_OVERFLOW (t)) -- cgit v1.1