On Wed, Feb 27, 2019 at 02:29:32AM +0900, Mamoru TASAKA wrote:
> Richard Shaw wrote on 2019/02/27 2:23:
> > On Tue, Feb 26, 2019 at 11:17 AM Mamoru TASAKA <mtas...@fedoraproject.org>
> > wrote:
> > 
> > > So... I guess Qt "foreach" behavior changed with gcc9..
> > > 
> > 
> > Is there any chance this will change or magically get fixed if qt is
> > rebuilt with gcc 9?
> > 
> > Thanks,
> > Richard
> > 
> Well, foreach or Q_FOREACH is just a "#define" macro (from 
> /usr/include/Qt/qglobal.h and
> /usr/include/QtCore/qglobal.h), so rebuilding qt(4) itself does not sense.

The Q_FOREACH macro relied on a G++ bug, which got fixed (in particular, g++
rejects forever break; and continue; in statement expressions
outside of a loop body (condition, init expr, increment expr) if there is
no outer loop, but due to a bug if it got past this check, for C++ would
jump to the break/continue labels of the inner rather than outer loop; for C
we got it right, and for GCC 9 finally fixed it.
You need the
fix, which should be in reasonably recent Qt, but if some packages use very
old headers, the patch needs to be applied...

Note, clang/clang++ for some weird reason chose the non-sensical behavior.

devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 

Reply via email to