https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90818
--- Comment #1 from Mark Atkinson ---
Error message FYI:
source>: In lambda function:
:3:43: error: expected '{' before '->' token
3 | auto foo = []() __attribute__((cold)) -> bool { return false; };
|
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: mark.atkinson99 at gmail dot com
Target Milestone: ---
A lambda with both __attribute__ and a trailing return type is not accepted.
This compiles ok in clang and in gcc <= 8. Omitting
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87750
--- Comment #3 from Mark Atkinson ---
(In reply to Mark Atkinson from comment #2)
> Created attachment 44906 [details]
> Bug repro (godbolt link copy-paste)
Incidentally godbolt copies with syntax colour coding etc., but will only paste
as such
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87750
--- Comment #2 from Mark Atkinson ---
Created attachment 44906
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44906&action=edit
Bug repro (godbolt link copy-paste)
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: mark.atkinson99 at gmail dot com
Target Milestone: ---
Problem code: https://godbolt.org/z/3IpLz1
This is a cut down sample of real code that no longer compiles