This is the mail archive of the
mailing list for the GCC project.
Re: C++ PATCH for c++/56238 (ice-checking with static_cast)
- From: Jason Merrill <jason at redhat dot com>
- To: gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 16 Mar 2013 14:46:59 -0400
- Subject: Re: C++ PATCH for c++/56238 (ice-checking with static_cast)
- References: <5116B35D.firstname.lastname@example.org>
On 02/09/2013 03:36 PM, Jason Merrill wrote:
The code in build_non_dependent_expr has caught a number of issues in
the compiler; this is another case that fold_non_dependent_expr wasn't
properly recognizing as dependent. I think we want to use
instantiation_dependent there going forward, but for 4.8 I think let's
just check it in the ENABLE_CHECKING code.
Now that we're in stage 1 again, let's make that change.
Tested x86_64-pc-linux-gnu, applying to trunk.
Author: Jason Merrill <email@example.com>
Date: Thu Feb 7 12:49:05 2013 -0500
* pt.c (fold_non_dependent_expr_sfinae): Check
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 36175ca..6264add 100644
@@ -5044,9 +5044,8 @@ fold_non_dependent_expr_sfinae (tree expr, tsubst_flags_t complain)
as two declarations of the same function, for example. */
- && !type_dependent_expression_p (expr)
- && potential_constant_expression (expr)
- && !value_dependent_expression_p (expr))
+ && !instantiation_dependent_expression_p (expr)
+ && potential_constant_expression (expr))