http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53078
--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-04-23
00:21:43 UTC ---
Are you *really* sure you are using current 4.8? I get:
paolo@poldo4:~/Work> g++ -std=c++11 -Wall -Wextra -Werror -pedantic 53078.C
53078.C: In function ‘int main()’:
53078.C:1:19: error: variable ‘x’ set but not used
[-Werror=unused-but-set-variable]
int main() { auto x = []{}; }
^
