[C++ Patch] PR 51424
Jason Merrill
jason@redhat.com
Thu Aug 29 19:45:00 GMT 2013
On 08/29/2013 11:24 AM, Paolo Carlini wrote:
> + if ((complain & tf_error)
> + && (flags & LOOKUP_DELEGATING_CONS)
> + && name == complete_ctor_identifier
> + && TREE_CODE (ret) == CALL_EXPR
> + && (DECL_ABSTRACT_ORIGIN (TREE_OPERAND (CALL_EXPR_FN (ret), 0))
> + == current_function_decl))
> + error ("constructor delegates to itself");
How about doing this check in perform_target_ctor instead, so you don't
need another LOOKUP flag?
Jason
More information about the Gcc-patches
mailing list