Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

about 4 years ago

Language

C++

Compiler

clang 11.1.0

Options
Warnings
Don't Use Boost
C++2a(GNU)
no pedantic

Author

anonymous

about 4 years ago

$ clang++ prog.cc -Wall -Wextra -std=gnu++2a
prog.cc:12:12: warning: parentheses were disambiguated as redundant parentheses around declaration of variable named 'n' [-Wvexing-parse]
    display(n);
           ^~~
prog.cc:12:5: note: add enclosing parentheses to perform a function-style cast
    display(n);
    ^
    (         )
prog.cc:12:12: note: remove parentheses to silence this warning
    display(n);
           ^ ~
            
prog.cc:12:13: error: redefinition of 'n' with a different type: 'display' vs 'int64_t' (aka 'long')
    display(n);
            ^
prog.cc:11:13: note: previous definition is here
    int64_t n = 16;
            ^
1 warning and 1 error generated.
Exit Code:
1