Language
C++
Compiler
gcc 9.2.0
Options
Warnings
Boost 1.70.0
C++2a(GNU)
-pedantic
Raw compiler options
-Wconversion
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.70.0/gcc-9.2.0/include -std=gnu++2a -pedantic -WconversionExit Code:
1
Author
anonymous
almost 6 years ago
C++
gcc 9.2.0
Author
anonymous
almost 6 years ago
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.70.0/gcc-9.2.0/include -std=gnu++2a -pedantic -Wconversionprog.cc: In function 'int main()':
prog.cc:8:18: error: cannot convert 'Foo' to 'int' in initialization
8 | int a = Foo::Bar;
| ~~~~~^~~
| |
| Foo
prog.cc:8:9: warning: unused variable 'a' [-Wunused-variable]
8 | int a = Foo::Bar;
| ^