public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/79620] decltype() inside a lambda capturing-by-value
       [not found] <bug-79620-4@http.gcc.gnu.org/bugzilla/>
@ 2021-12-03  9:42 ` pinskia at gcc dot gnu.org
  2023-11-10 15:58 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-03  9:42 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |barry.revzin at gmail dot com

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 96095 has been marked as a duplicate of this bug. ***

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

* [Bug c++/79620] decltype() inside a lambda capturing-by-value
       [not found] <bug-79620-4@http.gcc.gnu.org/bugzilla/>
  2021-12-03  9:42 ` [Bug c++/79620] decltype() inside a lambda capturing-by-value pinskia at gcc dot gnu.org
@ 2023-11-10 15:58 ` cvs-commit at gcc dot gnu.org
  2023-11-10 16:00 ` ppalka at gcc dot gnu.org
  2023-11-10 16:06 ` ppalka at gcc dot gnu.org
  3 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-11-10 15:58 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>:

https://gcc.gnu.org/g:0410b754e56c0868203c2412e0585ba070ea938d

commit r14-5331-g0410b754e56c0868203c2412e0585ba070ea938d
Author: Patrick Palka <ppalka@redhat.com>
Date:   Fri Nov 10 10:58:06 2023 -0500

    c++: decltype of (by-value captured reference) [PR79620]

    The capture_decltype handling in finish_decltype_type wasn't looking
    through implicit INDIRECT_REF (added by convert_from_reference), which
    caused us to incorrectly resolve decltype((r)) to float& below.  This
    patch fixes this, and adds an assert to outer_automatic_var_p to help
    prevent against such bugs.

    We still don't fully accept the example ultimately because for the
    decltype inside the lambda's trailing return type, at that point we're
    in lambda type scope but not yet in lambda function scope that the
    capture_decltype handling looks for (which is an orthogonal bug).

            PR c++/79620

    gcc/cp/ChangeLog:

            * cp-tree.h (STRIP_REFERENCE_REF): Define.
            * semantics.cc (outer_var_p): Assert REFERENCE_REF_P is false.
            (finish_decltype_type): Look through implicit INDIRECT_REF when
            deciding whether to call capture_decltype.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp0x/lambda/lambda-decltype3.C: New test.

    Reviewed-by: Jason Merrill <jason@redhat.com>

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

* [Bug c++/79620] decltype() inside a lambda capturing-by-value
       [not found] <bug-79620-4@http.gcc.gnu.org/bugzilla/>
  2021-12-03  9:42 ` [Bug c++/79620] decltype() inside a lambda capturing-by-value pinskia at gcc dot gnu.org
  2023-11-10 15:58 ` cvs-commit at gcc dot gnu.org
@ 2023-11-10 16:00 ` ppalka at gcc dot gnu.org
  2023-11-10 16:06 ` ppalka at gcc dot gnu.org
  3 siblings, 0 replies; 4+ messages in thread
From: ppalka at gcc dot gnu.org @ 2023-11-10 16:00 UTC (permalink / raw)
  To: gcc-bugs

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

Patrick Palka <ppalka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ppalka at gcc dot gnu.org
           Assignee|unassigned at gcc dot gnu.org      |ppalka at gcc dot gnu.org
             Status|NEW                         |RESOLVED
   Target Milestone|---                         |14.0
         Resolution|---                         |FIXED

--- Comment #5 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Fixed for GCC 14.

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

* [Bug c++/79620] decltype() inside a lambda capturing-by-value
       [not found] <bug-79620-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2023-11-10 16:00 ` ppalka at gcc dot gnu.org
@ 2023-11-10 16:06 ` ppalka at gcc dot gnu.org
  3 siblings, 0 replies; 4+ messages in thread
From: ppalka at gcc dot gnu.org @ 2023-11-10 16:06 UTC (permalink / raw)
  To: gcc-bugs

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

Patrick Palka <ppalka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|https://gcc.gnu.org/bugzill |
                   |a/show_bug.cgi?id=63192     |
                 CC|                            |dacamara.cameron at gmail dot com

--- Comment #6 from Patrick Palka <ppalka at gcc dot gnu.org> ---
*** Bug 63192 has been marked as a duplicate of this bug. ***

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

end of thread, other threads:[~2023-11-10 16:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-79620-4@http.gcc.gnu.org/bugzilla/>
2021-12-03  9:42 ` [Bug c++/79620] decltype() inside a lambda capturing-by-value pinskia at gcc dot gnu.org
2023-11-10 15:58 ` cvs-commit at gcc dot gnu.org
2023-11-10 16:00 ` ppalka at gcc dot gnu.org
2023-11-10 16:06 ` ppalka 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).