Language
C++
Compiler
gcc 7.3.0
Options
Warnings
Boost 1.69.0
C++11(GNU)
no pedantic
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.69.0/gcc-7.3.0/include -std=gnu++11
10
11
12
Exit Code:
0
Author
anonymous
about 6 years ago
C++
gcc 7.3.0
Author
anonymous
about 6 years ago
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.69.0/gcc-7.3.0/include -std=gnu++11
prog.cc: In function 'int main()':
prog.cc:16:6: warning: capture of variable 'global' with non-automatic storage duration
[global] { ++global; } ();
^~~~~~
prog.cc:6:5: note: 'int global' declared here
int global = 10;
^~~~~~
10
11
12