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

--- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> ---
I forgot that pointer offsets are treated internally as signed even if they are
unsigned in the source code.  That seems like an important detail for the new
option to document.

Although to be honest, even regardless of the signedness issue, I'm having a
hard time coming up with a use case for this sort of instrumentation.  When is
it useful to only have pointer arithmetic overflow diagnosed without diagnosing
all expressions that form out-of-bounds/invalid pointers from valid ones?

Reply via email to