[Bug c++/64791] Generic lambda fails to implicitly capture `const` variable

ville.voutilainen at gmail dot com gcc-bugzilla@gcc.gnu.org
Tue Jan 27 12:53:00 GMT 2015


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

--- Comment #4 from Ville Voutilainen <ville.voutilainen at gmail dot com> ---
Oh, wait a minute, with trunk, I see an incorrect warning:

prog.cc: In function 'int main()':
prog.cc:7:15: warning: variable 'a' set but not used
[-Wunused-but-set-variable]
    const int a = 2;
              ^



More information about the Gcc-bugs mailing list