[Bug tree-optimization/106064] Wrong code comparing two global zero-sized arrays

acoplan at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jun 24 10:34:10 GMT 2022


--- Comment #7 from Alex Coplan <acoplan at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #6)
> Note whether a != b is probably undefined (but zero size objects are a GNU
> extension).

Just to clarify, are you saying this is undefined specifically for zero size
objects or undefined in general for distinct objects? I thought for the latter
== and != were ok, but < and such were UB.

More information about the Gcc-bugs mailing list