public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/94807] New: Inconsistency in lambda instantiation
@ 2020-04-27 20:18 nathan at gcc dot gnu.org
  2020-04-27 20:18 ` [Bug c++/94807] " nathan at gcc dot gnu.org
  2020-05-05 15:01 ` nathan at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: nathan at gcc dot gnu.org @ 2020-04-27 20:18 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 94807
           Summary: Inconsistency in lambda instantiation
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: nathan at gcc dot gnu.org
  Target Milestone: ---

The parser renames a lambda's function operator's object pointer argument to be
'__closure' (closure_identifier).  This gets lost, if that lambda's in a
template, when the containing template is instantiated.

This is confusing to compiler devs, and (at least) causes a workaround in the
coro machinery.

template<int I> struct frob
{
  int i;
  void m ()
  {
    auto b = [] {};  // named __closure in the template
    b ();
  }
};


frob<0> i;

int x ()
{
  i.m (); // named __this in the instantiation
}

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

* [Bug c++/94807] Inconsistency in lambda instantiation
  2020-04-27 20:18 [Bug c++/94807] New: Inconsistency in lambda instantiation nathan at gcc dot gnu.org
@ 2020-04-27 20:18 ` nathan at gcc dot gnu.org
  2020-05-05 15:01 ` nathan at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: nathan at gcc dot gnu.org @ 2020-04-27 20:18 UTC (permalink / raw)
  To: gcc-bugs

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

Nathan Sidwell <nathan at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |nathan at gcc dot gnu.org
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2020-04-27

--- Comment #1 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
Something for stage 1

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

* [Bug c++/94807] Inconsistency in lambda instantiation
  2020-04-27 20:18 [Bug c++/94807] New: Inconsistency in lambda instantiation nathan at gcc dot gnu.org
  2020-04-27 20:18 ` [Bug c++/94807] " nathan at gcc dot gnu.org
@ 2020-05-05 15:01 ` nathan at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: nathan at gcc dot gnu.org @ 2020-05-05 15:01 UTC (permalink / raw)
  To: gcc-bugs

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

Nathan Sidwell <nathan at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #2 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
Fixed 733195e367d, adjusted instantiation to set the name.

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

end of thread, other threads:[~2020-05-05 15:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-27 20:18 [Bug c++/94807] New: Inconsistency in lambda instantiation nathan at gcc dot gnu.org
2020-04-27 20:18 ` [Bug c++/94807] " nathan at gcc dot gnu.org
2020-05-05 15:01 ` nathan 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).