[Bug c++/90818] New: Lambda with __attribute__ and explicit return type not accepted
mark.atkinson99 at gmail dot com
gcc-bugzilla@gcc.gnu.org
Mon Jun 10 17:24:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90818
Bug ID: 90818
Summary: Lambda with __attribute__ and explicit return type not
accepted
Product: gcc
Version: 9.1.0
Status: UNCONFIRMED
Severity: normal
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 the trailing return type
works ok.
int main()
{
auto foo = []() __attribute__((cold)) -> bool { return false; };
}
More information about the Gcc-bugs
mailing list