[llvm-bugs] [Bug 33874] Differences in function type handling compared with gcc?

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Oct 11 16:22:06 PDT 2017


Richard Smith <richard-llvm at metafoo.co.uk> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID
                 CC|                            |richard-llvm at metafoo.co.uk

--- Comment #1 from Richard Smith <richard-llvm at metafoo.co.uk> ---
This is a GCC bug. See [expr.prim.lambda.capture]/10.2:

"For each entity captured by copy, an unnamed non-static data member is
declared in the closure type. The declaration order of these members is
unspecified. The type of such a data member is the referenced type if the
entity is a reference to an object, an lvalue reference to the referenced
function type if the entity is a reference to a function, or the type of the
corresponding captured entity otherwise."

The type of the implicitly declared capture for "e" within the lambda closure
type is 'void (&)()', not 'void ()'.

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20171011/cfb6609f/attachment.html>

More information about the llvm-bugs mailing list