public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/109422] New: wrong depth used for template parameter mangling for lambdas in function signatures
@ 2023-04-05 17:36 richard-gccbugzilla at metafoo dot co.uk
  2023-04-05 17:39 ` [Bug c++/109422] " richard-gccbugzilla at metafoo dot co.uk
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: richard-gccbugzilla at metafoo dot co.uk @ 2023-04-05 17:36 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 109422
           Summary: wrong depth used for template parameter mangling for
                    lambdas in function signatures
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: richard-gccbugzilla at metafoo dot co.uk
  Target Milestone: ---

Testcase:

struct C {
  template<typename T>
  void f(decltype([](T, auto) { return 0; })) {}  
};
void g() { C().f<int>({}); }

GCC mangles f<int> as _ZN1C1fIiEEvDTtlNS_UlT_T_E_EEE -- note that this is
mangling / numbering the lambda directly within C, which is not permitted by
http://itanium-cxx-abi.github.io/cxx-abi/abi.html#closure-types but seems like
the best choice (see https://github.com/itanium-cxx-abi/cxx-abi/issues/165).

But the mangling of the <lambda-sig> as T_T_ is definitely wrong -- two
different template parameters should not be mangled the same. This should
instead be mangled as T_TL__ under
https://github.com/itanium-cxx-abi/cxx-abi/issues/31#issuecomment-528122117

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-11-17  2:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-05 17:36 [Bug c++/109422] New: wrong depth used for template parameter mangling for lambdas in function signatures richard-gccbugzilla at metafoo dot co.uk
2023-04-05 17:39 ` [Bug c++/109422] " richard-gccbugzilla at metafoo dot co.uk
2023-10-10 21:23 ` cvs-commit at gcc dot gnu.org
2023-11-17  2:42 ` jason at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).