Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 1 year ago

Language

C++

Compiler

gcc 13.2.0

Options
Warnings
Optimization
Boost 1.83.0
C++17
-pedantic-errors
Raw compiler options
-Wshadow

Author

anonymous

over 1 year ago

$ g++ prog.cc -Wall -Wextra -O2 -march=native -I/opt/wandbox/boost-1.83.0-gcc-13.2.0/include -std=c++17 -pedantic-errors -Wshadow
prog.cc: In function 'int main()':
prog.cc:6:16: warning: declaration of 'x' shadows a previous local [-Wshadow]
    6 |         double x = 3.14;
      |                ^
prog.cc:3:9: note: shadowed declaration is here
    3 |     int x = 42;
      |         ^
prog.cc:6:16: warning: unused variable 'x' [-Wunused-variable]
    6 |         double x = 3.14;
      |                ^
prog.cc:3:9: warning: unused variable 'x' [-Wunused-variable]
    3 |     int x = 42;
      |         ^
Exit Code:
0