Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

almost 3 years ago

Language

C++

Compiler

clang HEAD 16.0.0 (https://github.com/llvm/llvm-project.git 773d51ce3bedd091539aa86a5e5fc15a9174ff7b)

Options
Warnings
Optimization
Don't Use Boost
C++2a
-pedantic-errors
Raw compiler options
-fsanitize=undefined

Author

anonymous

almost 3 years ago

$ clang++ prog.cc -Wall -Wextra -O2 -march=native -std=c++2a -pedantic-errors -fsanitize=undefined
prog.cc:3:11: error: default initialization of an object of const type 'const int'
const int gcn;         // compile-time error
          ^
              = 0
prog.cc:4:18: error: default initialization of an object of const type 'const int'
static const int gscn; // compile-time error
                 ^
                      = 0
prog.cc:9:13: error: default initialization of an object of const type 'const int'
  const int lcn;         // compile-time error
            ^
                = 0
prog.cc:10:20: error: default initialization of an object of const type 'const int'
  static const int lscn; // compile-time error
                   ^
                        = 0
4 errors generated.
Exit Code:
1