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:9: error: increment of read-only variable 'i'
    7 |     rep(i, a[0], a[2]) {
      |         ^
prog.cc:3:84: note: in definition of macro 'rep'
    3 | #define rep(i, l, r) for (std::remove_reference_t<decltype(r)> i = (l); i < (r); ++i)
      |                                                                                    ^
Exit Code:
1