[Bug middle-end/93514] missing warning on a strlen with a negative or just past-the-end offset

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jan 30 20:13:00 GMT 2020


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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Martin Sebor from comment #3)
> There is no tail padding at ax2.a + 3, it's just past the end of the the
> four-byte object because ax2.a is at offset 1.

You're right, I was convinced I saw int i; char a[]; but it isn't there that
way.
Anyway, one needs to be careful about flexible array members and similar tail
arrays.


More information about the Gcc-bugs mailing list