https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109963

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2023-05-25

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Repeating the quoted comment, without bugzilla's unhelpful horizontal
scrollbar:

If compilers aren't going to give lambdas internal linkage in these situations,
the ABI needs to define a layout for them. As far as I can tell, Clang, GCC,
and ICC are all trying to use the same layout rule: explicit captures are added
in declaration order, then implicit captures are added in the source order of
their ODR use in the lambda body. The exception which causes this
incompatibility is that GCC seems to order implicit this arguments (and only
implicit ones) after the formal call arguments. I would argue that that's just
a GCC bug, and the this argument should be ordered as if it were written in
source. @jicama, do you agree?

Reply via email to