[Bug c++/71386] Wrong code on c++14 (GCC trunk)

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Jun 26 05:28:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71386

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
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 x){printf("%d ",x);return x;};
                                            ^
t9.cc:9:30: note: ‘xs1#0’ was declared here
   return [=](auto processList){return processList(xs...);};
                              ^
t9.cc:37:44: warning: ‘xs1#1’ is used uninitialized in this function
[-Wuninitialized]
 auto print_func = [](int x){printf("%d ",x);return x;};
                                            ^
t9.cc:9:30: note: ‘xs1#1’ was declared here
   return [=](auto processList){return processList(xs...);};
                              ^
t9.cc:37:44: warning: ‘xs1#2’ is used uninitialized in this function
[-Wuninitialized]
 auto print_func = [](int x){printf("%d ",x);return x;};
                                            ^
t9.cc:9:30: note: ‘xs1#2’ was declared here
   return [=](auto processList){return processList(xs...);};
                              ^


More information about the Gcc-bugs mailing list