public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/99379] New: lambda declared with deduced type 'auto' can appear in its own initializer
@ 2021-03-04 8:50 hewillk at gmail dot com
2021-03-04 8:55 ` [Bug c++/99379] " hewillk at gmail dot com
2021-03-04 16:10 ` mpolacek at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: hewillk at gmail dot com @ 2021-03-04 8:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99379
Bug ID: 99379
Summary: lambda declared with deduced type 'auto' can appear in
its own initializer
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
The following code accepts by GCC-trunk:
auto x = [x]{ };
godbolt: https://godbolt.org/z/e76Kn1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/99379] lambda declared with deduced type 'auto' can appear in its own initializer
2021-03-04 8:50 [Bug c++/99379] New: lambda declared with deduced type 'auto' can appear in its own initializer hewillk at gmail dot com
@ 2021-03-04 8:55 ` hewillk at gmail dot com
2021-03-04 16:10 ` mpolacek at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: hewillk at gmail dot com @ 2021-03-04 8:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99379
--- Comment #1 from 康桓瑋 <hewillk at gmail dot com> ---
I find this:
https://stackoverflow.com/questions/25693676/auto-variable-used-in-lambda-in-its-own-initializer
So this is not a bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/99379] lambda declared with deduced type 'auto' can appear in its own initializer
2021-03-04 8:50 [Bug c++/99379] New: lambda declared with deduced type 'auto' can appear in its own initializer hewillk at gmail dot com
2021-03-04 8:55 ` [Bug c++/99379] " hewillk at gmail dot com
@ 2021-03-04 16:10 ` mpolacek at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2021-03-04 16:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99379
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |INVALID
CC| |mpolacek at gcc dot gnu.org
Status|UNCONFIRMED |RESOLVED
--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
(In reply to 康桓瑋 from comment #1)
> I find this:
> https://stackoverflow.com/questions/25693676/auto-variable-used-in-lambda-in-
> its-own-initializer
> So this is not a bug.
Closing then.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-03-04 16:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-04 8:50 [Bug c++/99379] New: lambda declared with deduced type 'auto' can appear in its own initializer hewillk at gmail dot com
2021-03-04 8:55 ` [Bug c++/99379] " hewillk at gmail dot com
2021-03-04 16:10 ` mpolacek 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).