Language
C++
Compiler
gcc HEAD 9.0.0 20181016 (experimental)
Options
Warnings
Boost 1.68.0
C++2a(GNU)
no pedantic
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.68.0/gcc-head/include -std=gnu++2a Exit Code:
1
Author
anonymous
over 7 years ago
C++
gcc HEAD 9.0.0 20181016 (experimental)
Author
anonymous
over 7 years ago
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.68.0/gcc-head/include -std=gnu++2a prog.cc: In function 'int main()':
prog.cc:7:7: warning: unused variable 'x' [-Wunused-variable]
7 | char x = '2';
| ^
prog.cc: At global scope:
prog.cc:3:13: warning: 'x' defined but not used [-Wunused-variable]
3 | static char x = '1';
| ^
/tmp/ccpewy66.o: In function `main':
prog.cc:(.text+0xf): undefined reference to `x'
collect2: error: ld returned 1 exit status