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

--- Comment #3 from jkb at sanger dot ac.uk ---
I'd definitely be in favour of John's rewording of the warning - "data pointed
to by ...".  This definitely led us up the garden path for a while.

While I agree the code could have been written differently, such as not using a
const char *, or having a length parameter instead of end pointer, I don't feel
it is the compilers responsibility to prefer one style over another.  That
said, I concur that the minimal change to ignoring this check for zero sized
objects would catch the more common idioms of bounds checking.

Thank you for the response.

Reply via email to