https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116519
--- Comment #2 from jbeulich at suse dot com --- And how does it know "irq" _is_ -2 (and not -3, -4, let alone positive)? After all, without the earlier value range restriction there's no warning, despite gcc then similarly not knowing [-INF,-1] is an invalid range. If a diagnostic mentions one specific value, I expect the compiler to have proven that this is _the_ value in use (perhaps for a specialized instantiation). I could somehow see a diagnostic here saying [-INF,-1] _may be_ used as an array index, and then only as an "extra" warning, not one enabled by default or -Wall. (It becoming [-INF,-2] is an effect of irq < gic_number_lines() aiui.)