[Bug middle-end/86827] [8/9 Regression] -Warray-bounds produces negative indicies

aoliva at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Nov 15 10:40:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86827

--- Comment #4 from Alexandre Oliva <aoliva at gcc dot gnu.org> ---
Erhm, but even that doesn't handle all anti-ranges properly; right below, we
state:

  /* The bounds need not be ordered.  Set HIB to use as the index
     of the larger of the bounds and LOB as the opposite.  */

which "corrects" the anti-range into the complementary range whenever we
haven't taken the correction above, e.g., when given an anti-range with
nonnegative boundaries.


More information about the Gcc-bugs mailing list