Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

almost 3 years ago

Language

C++

Compiler

gcc 12.1.0

Options
Warnings
Don't Use Boost
C++03
-pedantic-errors

Author

anonymous

almost 3 years ago

$ g++ prog.cc -Wall -Wextra -std=c++98 -pedantic-errors
prog.cc:2:14: error: scoped enums only available with '-std=c++11' or '-std=gnu++11' [-Wc++11-extensions]
    2 |     enum e : unsigned {
      |              ^~~~~~~~
prog.cc: In function 'void g()':
prog.cc:10:15: error: invalid conversion from 'int' to 'Mode::e' [-fpermissive]
   10 | void g() { fn(4); }
      |               ^
      |               |
      |               int
prog.cc:8:9: note:   initializing argument 1 of 'void fn(Mode::e)'
    8 | void fn(Mode::e /*m*/) {}
      |         ^~~~~~~
Exit Code:
1