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

--- Comment #15 from Jason Merrill <jason at gcc dot gnu.org> ---
(In reply to Jason Merrill from comment #13)
> But that still doesn't make the types the same, and the use of the variable
> in 2.ii has undefined behavior because it is accessing the value of the
> object through the wrong type, so the warning is correct.  We may want to
> allow it anyway for C compatibility.  Thoughts?

This does seem like significant trouble to make something work that isn't
actually valid C++, and it isn't hard to fix the code by giving the struct a
name.  Is the problematic header part of publicly available source code or only
the benchmark?

Reply via email to