https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91946
--- Comment #2 from Tim Ruehsen <tim.ruehsen at gmx dot de> --- Is ssize_t C99 ? Could you point to the specs so that any reader can verify that ? And by UB you mean, gcc sometimes gives 0 and sometimes 1 ? Even if it's UB, the behavior should be consistent. Since this is a real world issue - how can I reliably detect if 'p + n' would overflow or not if the checks sometimes work and sometimes not.