Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

about 2 years ago

Language

C++

Compiler

gcc HEAD 14.0.0 20230712 (experimental)

Options
Warnings
Optimization
Don't Use Boost
C++17(GNU)
no pedantic

Author

anonymous

about 2 years ago

noname

$ g++ prog.cc -Wall -Wextra -O2 -march=native -std=gnu++17
prog.cc: In function 'int main()':
prog.cc:7:12: warning: overflow in conversion from 'uint64_t' {aka 'long unsigned int'} to 'std::decay_t<int>' {aka 'int'} changes value from '18446744073709551615' to '-1' [-Woverflow]
    7 |     rep(i, ~uint64_t(0), 3) {
      |            ^
prog.cc:4:58: note: in definition of macro 'rep'
    4 | #define rep(i, l, r) for (std::decay_t<decltype(r)> i = (l); i < (r); ++i)
      |                                                          ^
-1
0
1
2
Exit Code:
0