https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108894
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> --- (In reply to qinzhao from comment #7) > 1. let -fstrict-flex-arrays=N to control the behavior of -fsanitize=bounds; I'm ok with that. > 2. -fsanitize=bounds-strict actually is an alias of -fsanitize=bounds > -fstrict-flex-arrays=2, i.e, it treats [], [0] as flexible array members, > but treat [1], [4], as regular arrays. Well, -fsanitize=bounds-strict certainly shouldn't imply -fstrict-flex-arrays=2, it should just treat [1] and [4] (but I think it does even [0] right now) as regular arrays for the purposes of the sanitization.