https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71386
Paolo Carlini changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71386
--- Comment #9 from paolo at gcc dot gnu.org ---
Author: paolo
Date: Mon Oct 2 12:40:26 2017
New Revision: 253350
URL: https://gcc.gnu.org/viewcvs?rev=253350=gcc=rev
Log:
2017-10-02 Paolo Carlini
PR
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71386
--- Comment #7 from Richard Biener ---
ISTR a similar bug in C++ lambda support related how we map them to nested
functions. PR69756.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71386
--- Comment #6 from Marc Glisse ---
Slightly simpler
template
auto List(XS...xs)
{
return [=](auto processList){return processList(xs...);};
};
auto l1 = List(42);
auto foo = [](auto... xs1)
{
return [=]()
{
return
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71386
--- Comment #5 from Marc Glisse ---
(In reply to Anton Mitrokhin from comment #3)
> I see those warnings with -O3, but not with -O0. Why is that?
As the documentation says, this warning depends on optimizations. A bogus
optimization that breaks
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71386
Andrew Pinski changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Last reconfirmed|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71386
--- Comment #3 from Anton Mitrokhin ---
I see those warnings with -O3, but not with -O0. Why is that?
I also do not see what is wrong with the code.
Note, that clang with all warnings enabled (and ub sanitizer!) will also not
produce any
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71386
--- Comment #2 from Andrew Pinski ---
With -Wall -W I get the following warnings from gcc:
t9.cc: In function ‘int main()’:
t9.cc:37:44: warning: ‘xs1#0’ is used uninitialized in this function
[-Wuninitialized]
auto print_func = [](int
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71386
--- Comment #1 from Anton Mitrokhin ---
Could anyone please take a look?