Open Quuxplusone opened 9 years ago
Bugzilla Link | PR23416 |
Status | CONFIRMED |
Importance | P normal |
Reported by | ncm (ncm@cantrip.org) |
Reported on | 2015-05-05 12:01:37 -0700 |
Last modified on | 2021-03-20 17:47:34 -0700 |
Version | unspecified |
Hardware | PC Linux |
CC | davidfromonline@gmail.com, dgregor@apple.com, llvm-bugs@lists.llvm.org |
Fixed by commit(s) | |
Attachments | |
Blocks | |
Blocked by | |
See also |
This matches gcc bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66028
See it live: https://godbolt.org/z/q8czzh
The workaround since C++17 is to modify your for loop to be
for ([[maybe_unused]] int i : range{0,10})
but I agree this warning is annoying when trying to use an integer range.