Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Language

C++

Compiler

clang HEAD 12.0.0 (https://github.com/llvm/llvm-project.git 9087209314caafed4b232d4a66287f2d16054ad3)

Options
Warnings
Boost 1.73.0
C++2a
no pedantic

$ clang++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.73.0/clang-head/include -std=c++2a
prog.cc:5:16: warning: field 'y' will be initialized after field 'x' [-Wreorder-ctor]
    A(int a) : y(a), x(y) {} // C5038, Initialized in reverse, y reused
               ^
prog.cc:5:24: warning: field 'y' is uninitialized when used here [-Wuninitialized]
    A(int a) : y(a), x(y) {} // C5038, Initialized in reverse, y reused
                       ^
2 warnings generated.
/usr/lib/gcc/x86_64-linux-gnu/5.5.0/../../../x86_64-linux-gnu/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
clang-12: error: linker command failed with exit code 1 (use -v to see invocation)
Exit Code:
1