https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69023
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |diagnostic --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- I think GCC is correct with its error message for b1 even if it does not do it also for b2. The meaning of x does change after the struct is finalized. Note this kind of diagnostic is not required to happen. That is the standard says the code is invalid but no diagnostic is required. This is one case where the two compilers can disagree but both be correct even though the one of them rejects the code.