Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 6 years ago

Language

C++

Compiler

clang HEAD 8.0.0 (https://github.com/llvm-mirror/clang.git 89caec8b662eac5a5d37f45b36c0790c9b5f3da5) (https://github.com/llvm-mirror/llvm.git 3787b838e1a5bf56ac0f64bffc00e7c1a245b00f)

Options
Warnings
Boost 1.68.0
C++2a(GNU)
no pedantic

Author

anonymous

over 6 years ago

$ clang++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.68.0/clang-head/include -std=gnu++2a
prog.cc:9:10: warning: empty parentheses interpreted as a function declaration [-Wvexing-parse]
    int y();
         ^~
prog.cc:9:10: note: replace parentheses with an initializer to declare a variable
    int y();
         ^~
          = 0
prog.cc:10:13: warning: address of function 'y' will always evaluate to 'true' [-Wpointer-bool-conversion]
    cout << y << endl;
         ~~ ^
prog.cc:10:13: note: prefix with the address-of operator to silence this warning
    cout << y << endl;
            ^
            &
prog.cc:7:13: warning: variable 'x' is uninitialized when used here [-Wuninitialized]
    cout << x << endl;
            ^
prog.cc:6:10: note: initialize the variable 'x' to silence this warning
    int x;
         ^
          = 0
3 warnings generated.
0
1
2
Exit Code:
0