https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109532
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Wilhelm M from comment #3) > Isn't this a case where the as-if rule kicks in? What rule is that? Scopped enums are different from unscopped ones here specifically as defined in the C++ standard.