This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++ PATCH] Fix PR 55418


Hi,

On 11/23/2012 04:47 PM, Jason Merrill wrote:
On 11/23/2012 10:46 AM, Jason Merrill wrote:
On 11/22/2012 11:03 AM, Paolo Carlini wrote:
initialized to true too), but Markus (and me ;) proposes anyway to
initialize trivial_p to false, thus we should be fine (way below
trivial_p is used again but only when deleted_p is false).

It certainly can't hurt.

Actually...we should be calculating triviality normally regardless of whether the function is deleted. Why isn't that happening?
Because in synthesized_method_walk for lambdas we have this early return:

if (deleted_p)
{
/* "The closure type associated with a lambda-expression has a deleted
default constructor and a deleted copy assignment operator."
This is diagnosed in maybe_explain_implicit_delete. */
if (LAMBDA_TYPE_P (ctype)
&& (sfk == sfk_constructor
|| sfk == sfk_copy_assignment))
{
*deleted_p = true;
return;
}


      *deleted_p = false;
    }

Paolo.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]