[Bug c++/93842] generic lambda accesses a variable with with automatic storage duration that wasn't captured by the lambda expression

2020-06-16 Thread kuzniar95 at o2 dot pl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93842 kuzniar95 at o2 dot pl changed: What|Removed |Added Resolution|--- |INVALID

[Bug c++/93842] generic lambda accesses a variable with with automatic storage duration that wasn't captured by the lambda expression

2020-06-16 Thread kuzniar95 at o2 dot pl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93842 kuzniar95 at o2 dot pl changed: What|Removed |Added Status|RESOLVED|UNCONFIRMED

[Bug c++/93842] generic lambda accesses a variable with with automatic storage duration that wasn't captured by the lambda expression

2020-06-16 Thread kuzniar95 at o2 dot pl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93842 --- Comment #6 from kuzniar95 at o2 dot pl --- P.S. odr_use function signature should be: void odr_use(const char&);

[Bug c++/93842] generic lambda accesses a variable with with automatic storage duration that wasn't captured by the lambda expression

2020-06-16 Thread kuzniar95 at o2 dot pl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93842 kuzniar95 at o2 dot pl changed: What|Removed |Added Resolution|--- |INVALID

[Bug c++/93842] generic lambda accesses a variable with with automatic storage duration that wasn't captured by the lambda expression

2020-02-23 Thread kuzniar95 at o2 dot pl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93842 --- Comment #4 from kuzniar95 at o2 dot pl --- I meant that dropping constness: char ch = '='; // OK results in an error: lambda.cpp: In lambda function: lambda.cpp:4:23: error: ‘ch’ is not captured 4 | [](auto) { return ch; }; // OK

[Bug c++/93842] generic lambda accesses a variable with with automatic storage duration that wasn't captured by the lambda expression

2020-02-20 Thread kuzniar95 at o2 dot pl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93842 --- Comment #3 from kuzniar95 at o2 dot pl --- @Richard Biener changing it to char const ch = '='; // NOT OK doesn't solve the issue. Interestingly dropping constness: char ch = '='; // OK works. So we are onto something - both const and

[Bug c++/93842] generic lambda accesses a variable with with automatic storage duration that wasn't captured by the lambda expression

2020-02-20 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93842 --- Comment #2 from Martin Liška --- Confirmed that clang really rejects the code: $ clang pr93842.cc -Wunused -std=c++14 -c pr93842.cc:4:20: error: variable 'ch' cannot be implicitly captured in a lambda with no capture-default specified

[Bug c++/93842] generic lambda accesses a variable with with automatic storage duration that wasn't captured by the lambda expression

2020-02-20 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93842 Richard Biener changed: What|Removed |Added Keywords||accepts-invalid, diagnostic ---