diff options
author | Kai Koehne <kai.koehne@theqtcompany.com> | 2015-07-24 12:33:29 +0200 |
---|---|---|
committer | Kai Koehne <kai.koehne@theqtcompany.com> | 2015-08-03 07:12:41 +0000 |
commit | 561ccd7ca3db39f74ee0dc3966d3c6a9234186b4 (patch) | |
tree | 7b4639848d3f194970343addf0ae398cdeadcdfb | |
parent | d57c6611157cdcb9b27aa99cd757d05e058ac50f (diff) |
Disable #pragma diagnostic [push|pop] for gcc 4.5
Fix warnings like
qalgorithms.h:40:16: warning: expected [error|warning|ignored] after `#pragma GCC diagnostic`
As the comment below also indicates, #pragma GCC diagnostic [push|pop]
is only supported from gcc 4.6 upwards. See also the GCC 4.6
changelog: https://gcc.gnu.org/gcc-4.6/changes.html
[ChangeLog][Compiler specific Changes] GCC: Fixed a regression introduced Qt 5.5.0
that generated lots of compiler warnings in Qt public headers when using
the (deprecated) version 4.5 of GCC.
Change-Id: I425388b61cd5fbf464a0f7dd46ce403d35c532a4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r-- | src/corelib/global/qcompilerdetection.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h index 7ef2741746..4828d8596a 100644 --- a/src/corelib/global/qcompilerdetection.h +++ b/src/corelib/global/qcompilerdetection.h @@ -1143,7 +1143,7 @@ # define QT_WARNING_DISABLE_GCC(text) QT_DO_PRAGMA(GCC diagnostic ignored text) // GCC directives work in Clang too # define QT_WARNING_DISABLE_INTEL(number) # define QT_WARNING_DISABLE_MSVC(number) -#elif defined(Q_CC_GNU) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 405) +#elif defined(Q_CC_GNU) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406) # define QT_WARNING_PUSH QT_DO_PRAGMA(GCC diagnostic push) # define QT_WARNING_POP QT_DO_PRAGMA(GCC diagnostic pop) # define QT_WARNING_DISABLE_GCC(text) QT_DO_PRAGMA(GCC diagnostic ignored text) |