public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/108026] New: Confusing pedwarn with template lambda with -std=c++11
@ 2022-12-09 0:58 pinskia at gcc dot gnu.org
2023-09-22 17:14 ` [Bug c++/108026] " pinskia at gcc dot gnu.org
2023-11-09 3:42 ` pinskia at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-12-09 0:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108026
Bug ID: 108026
Summary: Confusing pedwarn with template lambda with -std=c++11
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Keywords: diagnostic
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: pinskia at gcc dot gnu.org
Target Milestone: ---
Take:
```
auto a = []<bool whitespace>() {};
```
Compile with `-std=c++11 -pedantic`, we get currently:
```
<source>:1:12: warning: lambda templates are only available with '-std=c++14'
or '-std=gnu++14' [-Wc++14-extensions]
1 | auto a = []<bool whitespace>() {};
| ^
```
But change it to -std=c++14 we get:
```
<source>:1:12: warning: lambda templates are only available with '-std=c++20'
or '-std=gnu++20' [-Wc++20-extensions]
1 | auto a = []<bool whitespace>() {};
| ^
```
I am confused based on the warning/error message which is it?
So I looked into the history of this code and pedwarn message and found that
lamdba templates were proposed as part of the original paper about expanding
lamdba for C++14, N3418 but they were removed by before the approval of C++14,
N3559. And then finally in C++20 they were added back.
Anyways the pedwarn message is just confusing and should be fixed.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/108026] Confusing pedwarn with template lambda with -std=c++11
2022-12-09 0:58 [Bug c++/108026] New: Confusing pedwarn with template lambda with -std=c++11 pinskia at gcc dot gnu.org
@ 2023-09-22 17:14 ` pinskia at gcc dot gnu.org
2023-11-09 3:42 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-09-22 17:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108026
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=111529
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed by r14-4229-g9c62af101e11e1cce573c2b3d2e18b403412dbc8 .
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/108026] Confusing pedwarn with template lambda with -std=c++11
2022-12-09 0:58 [Bug c++/108026] New: Confusing pedwarn with template lambda with -std=c++11 pinskia at gcc dot gnu.org
2023-09-22 17:14 ` [Bug c++/108026] " pinskia at gcc dot gnu.org
@ 2023-11-09 3:42 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-11-09 3:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108026
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Target Milestone|--- |14.0
Status|UNCONFIRMED |RESOLVED
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed as mentioned.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-11-09 3:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-09 0:58 [Bug c++/108026] New: Confusing pedwarn with template lambda with -std=c++11 pinskia at gcc dot gnu.org
2023-09-22 17:14 ` [Bug c++/108026] " pinskia at gcc dot gnu.org
2023-11-09 3:42 ` pinskia 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).