public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug objc++/109728] New: lambda capture with initializer doesn't compile
@ 2023-05-04 7:25 falemagn at gmail dot com
2023-05-04 20:01 ` [Bug objc++/109728] lambda capture with initializer doesn't compile when compiling ObjC++ code pinskia at gcc dot gnu.org
2023-05-05 5:30 ` falemagn at gmail dot com
0 siblings, 2 replies; 3+ messages in thread
From: falemagn at gmail dot com @ 2023-05-04 7:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109728
Bug ID: 109728
Summary: lambda capture with initializer doesn't compile
Product: gcc
Version: 13.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: objc++
Assignee: unassigned at gcc dot gnu.org
Reporter: falemagn at gmail dot com
Target Milestone: ---
This simple snippet
int a;
auto b = [c = a]{};
Produces the following error:
error: 'c' was not declared in this scope
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug objc++/109728] lambda capture with initializer doesn't compile when compiling ObjC++ code.
2023-05-04 7:25 [Bug objc++/109728] New: lambda capture with initializer doesn't compile falemagn at gmail dot com
@ 2023-05-04 20:01 ` pinskia at gcc dot gnu.org
2023-05-05 5:30 ` falemagn at gmail dot com
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-05-04 20:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109728
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Oh this might be an ambiguity with ObjC++ parsing part.
[a b] is how you call an object-C method after all.
Is clang able to handle this case too?
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug objc++/109728] lambda capture with initializer doesn't compile when compiling ObjC++ code.
2023-05-04 7:25 [Bug objc++/109728] New: lambda capture with initializer doesn't compile falemagn at gmail dot com
2023-05-04 20:01 ` [Bug objc++/109728] lambda capture with initializer doesn't compile when compiling ObjC++ code pinskia at gcc dot gnu.org
@ 2023-05-05 5:30 ` falemagn at gmail dot com
1 sibling, 0 replies; 3+ messages in thread
From: falemagn at gmail dot com @ 2023-05-05 5:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109728
--- Comment #2 from Fabio Alemagna <falemagn at gmail dot com> ---
Yes, clang handles this case correctly.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-05-05 5:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-04 7:25 [Bug objc++/109728] New: lambda capture with initializer doesn't compile falemagn at gmail dot com
2023-05-04 20:01 ` [Bug objc++/109728] lambda capture with initializer doesn't compile when compiling ObjC++ code pinskia at gcc dot gnu.org
2023-05-05 5:30 ` falemagn at gmail dot com
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).