public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/110562] New: GCC does not report the error about lambda contains unexpanded parameter pack
@ 2023-07-05 15:46 hewillk at gmail dot com
2023-07-05 22:51 ` [Bug c++/110562] " pinskia at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: hewillk at gmail dot com @ 2023-07-05 15:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110562
Bug ID: 110562
Summary: GCC does not report the error about lambda contains
unexpanded parameter pack
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
GCC accepts the following invalid code, which is rejected by Clang and MSVC:
template<class... T>
void f() {
[]<T>(){ T x; };
};
int main() {
f<int, int, int>();
}
https://godbolt.org/z/nreTzPnsK
And if we call this lambda immediately like []<T>(){ T x; }(), gcc's error
message is quite confusing:
<source>:3:14: error: 'T x' has incomplete type
3 | []<T>(){ T x; }();
| ^
https://godbolt.org/z/vfrKGTsjq
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/110562] GCC does not report the error about lambda contains unexpanded parameter pack
2023-07-05 15:46 [Bug c++/110562] New: GCC does not report the error about lambda contains unexpanded parameter pack hewillk at gmail dot com
@ 2023-07-05 22:51 ` pinskia at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-07-05 22:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110562
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2023-07-05
Ever confirmed|0 |1
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-05 22:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-05 15:46 [Bug c++/110562] New: GCC does not report the error about lambda contains unexpanded parameter pack hewillk at gmail dot com
2023-07-05 22:51 ` [Bug c++/110562] " 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).