public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/82980] [9/10/11/12 Regression] template keyword should not be required for captured decl of the "base" type
       [not found] <bug-82980-4@http.gcc.gnu.org/bugzilla/>
@ 2021-12-22  3:44 ` pinskia at gcc dot gnu.org
  2021-12-22  3:47 ` pinskia at gcc dot gnu.org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-22  3:44 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Regression in determination |[9/10/11/12 Regression]
                   |of current instantiation    |template keyword should not
                   |(invalid requirement of     |be required for captured
                   |template keyword)           |decl of the "base" type
   Last reconfirmed|                            |2021-12-22
     Ever confirmed|0                           |1
      Known to work|                            |6.1.0
             Status|UNCONFIRMED                 |NEW
           Keywords|                            |rejects-valid
      Known to fail|                            |7.1.0

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.

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

* [Bug c++/82980] [9/10/11/12 Regression] template keyword should not be required for captured decl of the "base" type
       [not found] <bug-82980-4@http.gcc.gnu.org/bugzilla/>
  2021-12-22  3:44 ` [Bug c++/82980] [9/10/11/12 Regression] template keyword should not be required for captured decl of the "base" type pinskia at gcc dot gnu.org
@ 2021-12-22  3:47 ` pinskia at gcc dot gnu.org
  2022-01-17  9:00 ` rguenth at gcc dot gnu.org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-22  3:47 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gabriel_machado at live dot com

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

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

* [Bug c++/82980] [9/10/11/12 Regression] template keyword should not be required for captured decl of the "base" type
       [not found] <bug-82980-4@http.gcc.gnu.org/bugzilla/>
  2021-12-22  3:44 ` [Bug c++/82980] [9/10/11/12 Regression] template keyword should not be required for captured decl of the "base" type pinskia at gcc dot gnu.org
  2021-12-22  3:47 ` pinskia at gcc dot gnu.org
@ 2022-01-17  9:00 ` rguenth at gcc dot gnu.org
  2022-01-31 16:00 ` [Bug c++/82980] [9/10/11/12 Regression] template keyword should not be required for captured decl of the "base" type since r6-6866-gff2faafcf689b6c2 marxin at gcc dot gnu.org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-01-17  9:00 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2
   Target Milestone|---                         |9.5

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

* [Bug c++/82980] [9/10/11/12 Regression] template keyword should not be required for captured decl of the "base" type since r6-6866-gff2faafcf689b6c2
       [not found] <bug-82980-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2022-01-17  9:00 ` rguenth at gcc dot gnu.org
@ 2022-01-31 16:00 ` marxin at gcc dot gnu.org
  2022-04-14 18:52 ` cvs-commit at gcc dot gnu.org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-01-31 16:00 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[9/10/11/12 Regression]     |[9/10/11/12 Regression]
                   |template keyword should not |template keyword should not
                   |be required for captured    |be required for captured
                   |decl of the "base" type     |decl of the "base" type
                   |                            |since
                   |                            |r6-6866-gff2faafcf689b6c2
           Keywords|needs-bisection             |
                 CC|                            |jason at gcc dot gnu.org,
                   |                            |marxin at gcc dot gnu.org

--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r6-6866-gff2faafcf689b6c2.

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

* [Bug c++/82980] [9/10/11/12 Regression] template keyword should not be required for captured decl of the "base" type since r6-6866-gff2faafcf689b6c2
       [not found] <bug-82980-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2022-01-31 16:00 ` [Bug c++/82980] [9/10/11/12 Regression] template keyword should not be required for captured decl of the "base" type since r6-6866-gff2faafcf689b6c2 marxin at gcc dot gnu.org
@ 2022-04-14 18:52 ` cvs-commit at gcc dot gnu.org
  2022-04-14 18:56 ` [Bug c++/82980] [9/10/11 " jason at gcc dot gnu.org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-04-14 18:52 UTC (permalink / raw)
  To: gcc-bugs

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

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

https://gcc.gnu.org/g:74b2e20222cf4fb24b90561ddb6f0989738bb722

commit r12-8165-g74b2e20222cf4fb24b90561ddb6f0989738bb722
Author: Jason Merrill <jason@redhat.com>
Date:   Thu Apr 14 08:16:45 2022 -0400

    c++: lambda and the current instantiation [PR82980]

    When a captured variable is type-dependent, we've expressed the type of the
    capture field and proxy with a decltype variant.  But if the type is "the
    current instantiation", we need to be able to see that so that we can do
    lookup inside it just like we could with the captured variable itself.

    I also tried looking through lambda capture in
    cp_parser_postfix_dot_deref_expression, but this way seems cleaner.  I plan
    to treat more types as deducible in stage 1.

    I considered also using this in do_auto_deduction, but think that would be
    wrong: [temp.dep.expr] says an id-expression is type-dependent if it is
    "associated by name lookup with a variable declared with a type that
    contains a placeholder type where the initializer is type-dependent".  That
    doesn't clearly exclude deducing a dependent type from the initializer, but
    it seems like a barrier, and other implementations agree.

            PR c++/82980

    gcc/cp/ChangeLog:

            * lambda.cc (type_deducible_expression_p): New.
            (lambda_capture_field_type): Check it.

    gcc/testsuite/ChangeLog:

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

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

* [Bug c++/82980] [9/10/11 Regression] template keyword should not be required for captured decl of the "base" type since r6-6866-gff2faafcf689b6c2
       [not found] <bug-82980-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2022-04-14 18:52 ` cvs-commit at gcc dot gnu.org
@ 2022-04-14 18:56 ` jason at gcc dot gnu.org
  2022-04-29 21:24 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: jason at gcc dot gnu.org @ 2022-04-14 18:56 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
            Summary|[9/10/11/12 Regression]     |[9/10/11 Regression]
                   |template keyword should not |template keyword should not
                   |be required for captured    |be required for captured
                   |decl of the "base" type     |decl of the "base" type
                   |since                       |since
                   |r6-6866-gff2faafcf689b6c2   |r6-6866-gff2faafcf689b6c2
           Assignee|unassigned at gcc dot gnu.org      |jason at gcc dot gnu.org

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

* [Bug c++/82980] [9/10/11 Regression] template keyword should not be required for captured decl of the "base" type since r6-6866-gff2faafcf689b6c2
       [not found] <bug-82980-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2022-04-14 18:56 ` [Bug c++/82980] [9/10/11 " jason at gcc dot gnu.org
@ 2022-04-29 21:24 ` cvs-commit at gcc dot gnu.org
  2022-05-12 20:14 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-04-29 21:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jason Merrill <jason@gcc.gnu.org>:

https://gcc.gnu.org/g:53e7252140c95afc859ade521a61ab4115d7fb11

commit r13-53-g53e7252140c95afc859ade521a61ab4115d7fb11
Author: Jason Merrill <jason@redhat.com>
Date:   Thu Apr 14 14:09:13 2022 -0400

    c++: lambda capture dependent type [PR82980]

    The stage 4 patch limited direct propagation of dependent type to capture
    field/proxy to the "current instantiation", but many more types should be
    suitable as well.

            PR c++/82980

    gcc/cp/ChangeLog:

            * lambda.cc (type_deducible_expression_p): Allow more types.

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

* [Bug c++/82980] [9/10/11 Regression] template keyword should not be required for captured decl of the "base" type since r6-6866-gff2faafcf689b6c2
       [not found] <bug-82980-4@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2022-04-29 21:24 ` cvs-commit at gcc dot gnu.org
@ 2022-05-12 20:14 ` cvs-commit at gcc dot gnu.org
  2022-05-12 21:24 ` [Bug c++/82980] [9/10 " cvs-commit at gcc dot gnu.org
  2022-05-12 21:34 ` jason at gcc dot gnu.org
  9 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-05-12 20:14 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:

https://gcc.gnu.org/g:dc8739c2ab14f0108e4fabbd565fa0918e4425ee

commit r11-9986-gdc8739c2ab14f0108e4fabbd565fa0918e4425ee
Author: Jason Merrill <jason@redhat.com>
Date:   Thu Apr 14 08:16:45 2022 -0400

    c++: lambda and the current instantiation [PR82980]

    When a captured variable is type-dependent, we've expressed the type of the
    capture field and proxy with a decltype variant.  But if the type is "the
    current instantiation", we need to be able to see that so that we can do
    lookup inside it just like we could with the captured variable itself.

    I also tried looking through lambda capture in
    cp_parser_postfix_dot_deref_expression, but this way seems cleaner.  I plan
    to treat more types as deducible in stage 1.

    I considered also using this in do_auto_deduction, but think that would be
    wrong: [temp.dep.expr] says an id-expression is type-dependent if it is
    "associated by name lookup with a variable declared with a type that
    contains a placeholder type where the initializer is type-dependent".  That
    doesn't clearly exclude deducing a dependent type from the initializer, but
    it seems like a barrier, and other implementations agree.

            PR c++/82980

    gcc/cp/ChangeLog:

            * lambda.c (type_deducible_expression_p): New.
            (lambda_capture_field_type): Check it.

    gcc/testsuite/ChangeLog:

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

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

* [Bug c++/82980] [9/10 Regression] template keyword should not be required for captured decl of the "base" type since r6-6866-gff2faafcf689b6c2
       [not found] <bug-82980-4@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2022-05-12 20:14 ` cvs-commit at gcc dot gnu.org
@ 2022-05-12 21:24 ` cvs-commit at gcc dot gnu.org
  2022-05-12 21:34 ` jason at gcc dot gnu.org
  9 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-05-12 21:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:

https://gcc.gnu.org/g:3efc6fd0df1ce4988a1ae117d3a77134213930a3

commit r10-10726-g3efc6fd0df1ce4988a1ae117d3a77134213930a3
Author: Jason Merrill <jason@redhat.com>
Date:   Thu Apr 14 08:16:45 2022 -0400

    c++: lambda and the current instantiation [PR82980]

    When a captured variable is type-dependent, we've expressed the type of the
    capture field and proxy with a decltype variant.  But if the type is "the
    current instantiation", we need to be able to see that so that we can do
    lookup inside it just like we could with the captured variable itself.

    I also tried looking through lambda capture in
    cp_parser_postfix_dot_deref_expression, but this way seems cleaner.  I plan
    to treat more types as deducible in stage 1.

    I considered also using this in do_auto_deduction, but think that would be
    wrong: [temp.dep.expr] says an id-expression is type-dependent if it is
    "associated by name lookup with a variable declared with a type that
    contains a placeholder type where the initializer is type-dependent".  That
    doesn't clearly exclude deducing a dependent type from the initializer, but
    it seems like a barrier, and other implementations agree.

            PR c++/82980

    gcc/cp/ChangeLog:

            * lambda.c (type_deducible_expression_p): New.
            (lambda_capture_field_type): Check it.

    gcc/testsuite/ChangeLog:

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

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

* [Bug c++/82980] [9/10 Regression] template keyword should not be required for captured decl of the "base" type since r6-6866-gff2faafcf689b6c2
       [not found] <bug-82980-4@http.gcc.gnu.org/bugzilla/>
                   ` (8 preceding siblings ...)
  2022-05-12 21:24 ` [Bug c++/82980] [9/10 " cvs-commit at gcc dot gnu.org
@ 2022-05-12 21:34 ` jason at gcc dot gnu.org
  9 siblings, 0 replies; 10+ messages in thread
From: jason at gcc dot gnu.org @ 2022-05-12 21:34 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
   Target Milestone|9.5                         |10.4
             Status|ASSIGNED                    |RESOLVED

--- Comment #8 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed for 10.4, 11.3, 12.

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

end of thread, other threads:[~2022-05-12 21:34 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-82980-4@http.gcc.gnu.org/bugzilla/>
2021-12-22  3:44 ` [Bug c++/82980] [9/10/11/12 Regression] template keyword should not be required for captured decl of the "base" type pinskia at gcc dot gnu.org
2021-12-22  3:47 ` pinskia at gcc dot gnu.org
2022-01-17  9:00 ` rguenth at gcc dot gnu.org
2022-01-31 16:00 ` [Bug c++/82980] [9/10/11/12 Regression] template keyword should not be required for captured decl of the "base" type since r6-6866-gff2faafcf689b6c2 marxin at gcc dot gnu.org
2022-04-14 18:52 ` cvs-commit at gcc dot gnu.org
2022-04-14 18:56 ` [Bug c++/82980] [9/10/11 " jason at gcc dot gnu.org
2022-04-29 21:24 ` cvs-commit at gcc dot gnu.org
2022-05-12 20:14 ` cvs-commit at gcc dot gnu.org
2022-05-12 21:24 ` [Bug c++/82980] [9/10 " cvs-commit at gcc dot gnu.org
2022-05-12 21:34 ` 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).