[Bug c++/48530] [C++0x][SFINAE] Hard errors with deleted d'tors
hjl.tools at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Apr 27 23:07:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48530
--- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> 2011-04-27 23:07:09 UTC ---
(In reply to comment #4)
> The issue noticed by Daniel in Comment #3 seems simple: happens only with
> checking enabled and disappears with the below (which passes testing).
>
> Jason, if you want, I can handle this.
>
> /////////////
>
> Index: tree.c
> ===================================================================
> --- tree.c (revision 173048)
> +++ tree.c (working copy)
> @@ -456,6 +456,9 @@ build_cplus_new (tree type, tree init, tsubst_flag
> return rval;
>
> rval = build_target_expr (slot, rval, complain);
> + if (rval == error_mark_node)
> + return error_mark_node;
> +
> TARGET_EXPR_IMPLICIT_P (rval) = 1;
>
> return rval;
Why not just
if (rval != error_mark_node)
TARGET_EXPR_IMPLICIT_P (rval) = 1;
return rval;
More information about the Gcc-bugs
mailing list