Commit 339922f4 by Jason Merrill Committed by Jason Merrill

PR c++/81359 - Unparsed NSDMI error from SFINAE context.

	* method.c (synthesized_method_walk): Don't diagnose lack of
	operator delete.

From-SVN: r251036
parent 4ce8c5de
2017-08-10 Jason Merrill <jason@redhat.com>
PR c++/81359 - Unparsed NSDMI error from SFINAE context.
* method.c (synthesized_method_walk): Don't diagnose lack of
operator delete.
PR c++/80452 - Core 1579, implicit move semantics on return/throw
* cp-tree.h (LOOKUP_PREFER_RVALUE): Now means that we've already
tentatively changed the lvalue to an rvalue.
......
......@@ -1693,12 +1693,18 @@ synthesized_method_walk (tree ctype, special_function_kind sfk, bool const_p,
if (check_vdtor && type_has_virtual_destructor (BINFO_TYPE (base_binfo)))
{
fn = locate_fn_flags (ctype, cp_operator_id (DELETE_EXPR),
ptr_type_node, flags, complain);
/* Unlike for base ctor/op=/dtor, for operator delete it's fine
to have a null fn (no class-specific op delete). */
if (fn && fn == error_mark_node && deleted_p)
*deleted_p = true;
fn = locate_fn_flags (ctype, cp_operator_id (DELETE_EXPR),
ptr_type_node, flags, tf_none);
if (fn && fn == error_mark_node)
{
if (complain & tf_error)
locate_fn_flags (ctype, cp_operator_id (DELETE_EXPR),
ptr_type_node, flags, complain);
if (deleted_p)
*deleted_p = true;
}
check_vdtor = false;
}
}
......
struct A {
void operator delete(void *, unsigned long);
};
struct B : A {
virtual ~B();
};
struct C : B {};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment