public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/60503] New: gcc looks for C++ attributes in the wrong place in a lambda-expression
@ 2014-03-11 20:19 richard-gccbugzilla at metafoo dot co.uk
2015-03-24 16:34 ` [Bug c++/60503] " paolo.carlini at oracle dot com
2022-12-07 10:25 ` alvinhochun at gmail dot com
0 siblings, 2 replies; 3+ messages in thread
From: richard-gccbugzilla at metafoo dot co.uk @ 2014-03-11 20:19 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60503
Bug ID: 60503
Summary: gcc looks for C++ attributes in the wrong place in a
lambda-expression
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: richard-gccbugzilla at metafoo dot co.uk
GCC accepts this ill-formed code:
void f() { []() [[ ]] mutable noexcept {}; }
... and rejects this valid code:
void f() { []() mutable noexcept [[ ]] {}; }
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/60503] gcc looks for C++ attributes in the wrong place in a lambda-expression
2014-03-11 20:19 [Bug c++/60503] New: gcc looks for C++ attributes in the wrong place in a lambda-expression richard-gccbugzilla at metafoo dot co.uk
@ 2015-03-24 16:34 ` paolo.carlini at oracle dot com
2022-12-07 10:25 ` alvinhochun at gmail dot com
1 sibling, 0 replies; 3+ messages in thread
From: paolo.carlini at oracle dot com @ 2015-03-24 16:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60503
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-03-24
Ever confirmed|0 |1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/60503] gcc looks for C++ attributes in the wrong place in a lambda-expression
2014-03-11 20:19 [Bug c++/60503] New: gcc looks for C++ attributes in the wrong place in a lambda-expression richard-gccbugzilla at metafoo dot co.uk
2015-03-24 16:34 ` [Bug c++/60503] " paolo.carlini at oracle dot com
@ 2022-12-07 10:25 ` alvinhochun at gmail dot com
1 sibling, 0 replies; 3+ messages in thread
From: alvinhochun at gmail dot com @ 2022-12-07 10:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60503
Alvin Wong <alvinhochun at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |alvinhochun at gmail dot com
--- Comment #6 from Alvin Wong <alvinhochun at gmail dot com> ---
Still a problem with 12.2 / trunk using GNU attributes:
$ <<EOF g++ -x c++ - -c -fsyntax-only
auto a() {
return [](int a) __attribute__((stdcall)) noexcept { return a + 1; };
}
EOF
<stdin>: In lambda function:
<stdin>:2:47: error: expected '{' before 'noexcept'
<stdin>: In function 'auto a()':
<stdin>:2:46: error: expected ';' before 'noexcept'
<stdin>:2:56: error: expected '(' before '{' token
<stdin>:2:56: error: expected primary-expression before '{' token
<stdin>:2:55: error: expected ')' before '{' token
https://godbolt.org/z/xMrb4Pqsj
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-12-07 10:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-11 20:19 [Bug c++/60503] New: gcc looks for C++ attributes in the wrong place in a lambda-expression richard-gccbugzilla at metafoo dot co.uk
2015-03-24 16:34 ` [Bug c++/60503] " paolo.carlini at oracle dot com
2022-12-07 10:25 ` alvinhochun 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).