public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/109781] New: erroneous error "lambda-expression in template parameter type" for tparam lambda returning a lambda @ 2023-05-08 21:35 eric.niebler at gmail dot com 2023-05-08 21:37 ` [Bug c++/109781] " pinskia at gcc dot gnu.org ` (5 more replies) 0 siblings, 6 replies; 7+ messages in thread From: eric.niebler at gmail dot com @ 2023-05-08 21:35 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109781 Bug ID: 109781 Summary: erroneous error "lambda-expression in template parameter type" for tparam lambda returning a lambda Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: eric.niebler at gmail dot com Target Milestone: --- template <auto A = []{ return []{}; }> struct C {}; ... on trunk with `-std=c++20` results in: <source>: In lambda function: <source>:1:31: error: lambda-expression in template parameter type 1 | template <auto A = []{ return []{}; }> | ^ Compiler returned: 1 I don't know of a reason why this code should be rejected. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/109781] erroneous error "lambda-expression in template parameter type" for tparam lambda returning a lambda 2023-05-08 21:35 [Bug c++/109781] New: erroneous error "lambda-expression in template parameter type" for tparam lambda returning a lambda eric.niebler at gmail dot com @ 2023-05-08 21:37 ` pinskia at gcc dot gnu.org 2023-05-16 12:17 ` [Bug c++/109781] [11/12/13/14 Regression] " ppalka at gcc dot gnu.org ` (4 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: pinskia at gcc dot gnu.org @ 2023-05-08 21:37 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109781 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Last reconfirmed| |2023-05-08 Status|UNCONFIRMED |NEW Keywords| |rejects-valid --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Confirmed. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/109781] [11/12/13/14 Regression] erroneous error "lambda-expression in template parameter type" for tparam lambda returning a lambda 2023-05-08 21:35 [Bug c++/109781] New: erroneous error "lambda-expression in template parameter type" for tparam lambda returning a lambda eric.niebler at gmail dot com 2023-05-08 21:37 ` [Bug c++/109781] " pinskia at gcc dot gnu.org @ 2023-05-16 12:17 ` ppalka at gcc dot gnu.org 2023-05-29 10:08 ` jakub at gcc dot gnu.org ` (3 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: ppalka at gcc dot gnu.org @ 2023-05-16 12:17 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109781 Patrick Palka <ppalka at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |11.4 Summary|erroneous error |[11/12/13/14 Regression] |"lambda-expression in |erroneous error |template parameter type" |"lambda-expression in |for tparam lambda returning |template parameter type" |a lambda |for tparam lambda returning | |a lambda Known to work| |10.3.0 See Also| |https://gcc.gnu.org/bugzill | |a/show_bug.cgi?id=99478 CC| |jason at gcc dot gnu.org, | |ppalka at gcc dot gnu.org --- Comment #2 from Patrick Palka <ppalka at gcc dot gnu.org> --- Started with r11-8166-ge1666ebd9ad31d. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/109781] [11/12/13/14 Regression] erroneous error "lambda-expression in template parameter type" for tparam lambda returning a lambda 2023-05-08 21:35 [Bug c++/109781] New: erroneous error "lambda-expression in template parameter type" for tparam lambda returning a lambda eric.niebler at gmail dot com 2023-05-08 21:37 ` [Bug c++/109781] " pinskia at gcc dot gnu.org 2023-05-16 12:17 ` [Bug c++/109781] [11/12/13/14 Regression] " ppalka at gcc dot gnu.org @ 2023-05-29 10:08 ` jakub at gcc dot gnu.org 2023-10-28 15:00 ` johelegp at gmail dot com ` (2 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: jakub at gcc dot gnu.org @ 2023-05-29 10:08 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109781 Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|11.4 |11.5 --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- GCC 11.4 is being released, retargeting bugs to GCC 11.5. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/109781] [11/12/13/14 Regression] erroneous error "lambda-expression in template parameter type" for tparam lambda returning a lambda 2023-05-08 21:35 [Bug c++/109781] New: erroneous error "lambda-expression in template parameter type" for tparam lambda returning a lambda eric.niebler at gmail dot com ` (2 preceding siblings ...) 2023-05-29 10:08 ` jakub at gcc dot gnu.org @ 2023-10-28 15:00 ` johelegp at gmail dot com 2023-10-28 15:01 ` johelegp at gmail dot com 2024-01-12 11:03 ` rguenth at gcc dot gnu.org 5 siblings, 0 replies; 7+ messages in thread From: johelegp at gmail dot com @ 2023-10-28 15:00 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109781 --- Comment #4 from Johel Ernesto Guerrero Peña <johelegp at gmail dot com> --- This isn't valid since <https://cplusplus.github.io/CWG/issues/2542.html>. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/109781] [11/12/13/14 Regression] erroneous error "lambda-expression in template parameter type" for tparam lambda returning a lambda 2023-05-08 21:35 [Bug c++/109781] New: erroneous error "lambda-expression in template parameter type" for tparam lambda returning a lambda eric.niebler at gmail dot com ` (3 preceding siblings ...) 2023-10-28 15:00 ` johelegp at gmail dot com @ 2023-10-28 15:01 ` johelegp at gmail dot com 2024-01-12 11:03 ` rguenth at gcc dot gnu.org 5 siblings, 0 replies; 7+ messages in thread From: johelegp at gmail dot com @ 2023-10-28 15:01 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109781 --- Comment #5 from Johel Ernesto Guerrero Peña <johelegp at gmail dot com> --- Add `+` to convert it to a pointer, and it's still rejected (<https://compiler-explorer.com/z/PMras4rzd>): ```C++ template <auto A = +[]{ return []{}; }> struct C {}; ``` ```output <source>: In lambda function: <source>:1:32: error: lambda-expression in template parameter type 1 | template <auto A = +[]{ return []{}; }> | ^ Compiler returned: 1 ``` ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/109781] [11/12/13/14 Regression] erroneous error "lambda-expression in template parameter type" for tparam lambda returning a lambda 2023-05-08 21:35 [Bug c++/109781] New: erroneous error "lambda-expression in template parameter type" for tparam lambda returning a lambda eric.niebler at gmail dot com ` (4 preceding siblings ...) 2023-10-28 15:01 ` johelegp at gmail dot com @ 2024-01-12 11:03 ` rguenth at gcc dot gnu.org 5 siblings, 0 replies; 7+ messages in thread From: rguenth at gcc dot gnu.org @ 2024-01-12 11:03 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109781 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P2 --- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> --- I wonder if it actually "works" in GCC 10? ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-01-12 11:03 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2023-05-08 21:35 [Bug c++/109781] New: erroneous error "lambda-expression in template parameter type" for tparam lambda returning a lambda eric.niebler at gmail dot com 2023-05-08 21:37 ` [Bug c++/109781] " pinskia at gcc dot gnu.org 2023-05-16 12:17 ` [Bug c++/109781] [11/12/13/14 Regression] " ppalka at gcc dot gnu.org 2023-05-29 10:08 ` jakub at gcc dot gnu.org 2023-10-28 15:00 ` johelegp at gmail dot com 2023-10-28 15:01 ` johelegp at gmail dot com 2024-01-12 11:03 ` rguenth 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).