[Bug c++/90617] GCC 9 miscompiles Qt4 "foreach" macro

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri May 24 15:29:00 GMT 2019


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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
>  for (int x = *_container_.i;
>         ;
>         __extension__ ({--_container_.brk; break;})) {
>
>      std::cout << "x = " << x << std::endl;
>    }


Hmmm,  the question here becomes where is that break should be breaking on; the
inner most for loop or the outer one?  Before GCC 9, it was the inner one but
in GCC 9 (and above) it is the outer most one.


More information about the Gcc-bugs mailing list