Still having the problem, as portability is mandatory here. It happens with a newly set up win7/64bit system as well.
I've found out in this thread, that there seems to be a patch by Thiago:
It looks like Thiago Macieira committed a fix for this back in January
(just add paths to QMAKE_DEFAULT_INCDIRS).
I am not sure, if this is an Environment variable or some .pro file setting, in addition I am not sure if the path I suspect is the right one. I've tried this - and some variants (quotes , higher folder levels etc") - in the .pro file.:
QMAKE_DEFAULT_INCDIRS = C:/Qt/5.5/mingw492_32/include/
I've taken theinfo about the folder from the warnings, e.g.:
C:/Qt/5.5/mingw492_32/include/QtCore/qlist.h:436:13: warning: cannot optimize loop, the loop counter may overflow [-Wunsafe-loop-optimizations]
while (current-- != from)
And I've created an environment variable by that name and content.
Both yet to no avail, warnings are still flushing in from Qt...
------------------------------------------------------------------------
edited:
------------------------------------------------------------------------
Finally I've found the solution here:
QMAKE_CXXFLAGS += -Wall -Wextra -Wunsafe-loop-optimizations -pedantic -Wfloat-equal -Wundef -Wpointer-arith -Wcast-align -Wunreachable-code
QMAKE_CXXFLAGS += -isystem $$[QT_INSTALL_HEADERS]
QMAKE_CXXFLAGS += -Wall -Wextra -Wunsafe-loop-optimizations -pedantic -Wfloat-equal -Wundef -Wpointer-arith -Wcast-align -Wunreachable-code
QMAKE_CXXFLAGS += -isystem $$[QT_INSTALL_HEADERS]
To copy to clipboard, switch view to plain text mode
Works like a charm for me.
Bookmarks