https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117912
--- Comment #19 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #12) > rejects-valid seems inappropriate here, sure, with the error attribute one > can error on all kinds of things and so most missed optimizations could be > that way rejects-valid as well. > I think it is wrong-code, __builtin_object_size (x, 1) is supposed to return > the minimum object size, so returning something smaller (like here 0) than > the minimum (which isn't really known, because we don't see what allocated > it and it is flexible array member) is wrong-code, returning something > larger is perhaps missed optimization (but we document that it can always > give up and return something more conservative up to all ones). I'd have expected that "conservative" for minimum works the other way around, so zero should be the fallback, not infinity?