On Tue, Mar 16, 2021 at 06:28:46PM -0600, Martin Sebor via Gcc-patches wrote:
> It seems sort of "inverted:" I'd expect OEP_LEXICOGRAPHIC on its
> own to do a lexicographical comparison, without having to set
> an additional bit to ask for it.  If a more refined form of

The new flag is really orthogonal to what OEP_LEXICOGRAPHIC does and
for the VLA checks you are using OEP_LEXICOGRAPHIC for I think you exactly
don't want that behavior, both a and b when they are a union members
with the same type will actually have the same value at least in the way
GCC implements unions, so you want to treat them the same.

The flag can also be called OEP_COMPONENT_REF_SAME_FIELD or whatever,
the reason for using the name I've used is just in case -Wduplicate-branches
will need another tweak in the future somewhere else, we don't have enough
bits to allocate for each detail separately.

        Jakub

Reply via email to