New QProperty system uses offsetof macro in macros like Q_OBJECT_COMPUTED_PROPERTY or Q_OBJECT_BINDABLE_PROPERTY.
This macro itself produces a warning like: offsetof within non-standard-layout type 'QTimerPrivate' is conditionally-supported
To suppress this warning we are using QT_WARNING_DISABLE_INVALID_OFFSETOF macro, which unwraps into smth like
on gcc-like compilers.
However this does not work on Windows with MinGW 8.1. See this integrations, for example: https://testresults.qt.io/coin/integration/qt/qtbase/tasks/1610705839
A bit of googling lead me to this long-lasting bug, which seems to be still valid for 8.1: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53431
I also found the possible solution here: https://stackoverflow.com/questions/43063596/g-ignores-pragma-diagnostic-ignored
One of the original 2012 reports for this issue at GNU's bugzilla included an offhand mention from the reporter, that _Pragma() would be processed as expected if they added either -save-temps or -no-integrated-cpp to the compile command.
Looks like adding -no-integrated-cpp flag for gcc < 9.0.0 should fix the issue.
However I have no idea, how to do it in our build system correctly.