diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2020-01-03 23:06:45 +0100 |
---|---|---|
committer | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2020-01-09 02:33:08 +0100 |
commit | c61cedcc5475a77fb94ed12788f61039835f8079 (patch) | |
tree | ede88eca1dd55bdbb5f29551bfbe5b6ec5d8bafa /src/corelib | |
parent | 22942058aa9c83acb809d0d4c6b78d29a3c33e12 (diff) |
GCC: revoke constexpr before 5.0
It's causing build failures on GCC 4.9 due to our code hitting
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57694
(at least since de82d239f814cf2a717bea0defeee3732384e271).
Task-number: QTBUG-80997
Change-Id: I80a9d1fcbf26d8c0bf514ddc7bdb86eb7173360f
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/global/qcompilerdetection.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h index 0091cfcb60..1ea4e7d287 100644 --- a/src/corelib/global/qcompilerdetection.h +++ b/src/corelib/global/qcompilerdetection.h @@ -883,7 +883,6 @@ # define Q_COMPILER_DEFAULT_MEMBERS # define Q_COMPILER_DELETE_MEMBERS /* C++11 features supported in GCC 4.6: */ -# define Q_COMPILER_CONSTEXPR # define Q_COMPILER_NULLPTR # define Q_COMPILER_UNRESTRICTED_UNIONS # define Q_COMPILER_RANGE_FOR @@ -914,7 +913,11 @@ # define Q_COMPILER_REF_QUALIFIERS # endif # endif - /* C++11 features are complete as of GCC 4.8.1 */ +# if Q_CC_GNU >= 500 + /* GCC 4.6 introduces constexpr, but it's bugged (at least) in the whole + * 4.x series, see e.g. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57694 */ +# define Q_COMPILER_CONSTEXPR +# endif # endif # if __cplusplus > 201103L # if Q_CC_GNU >= 409 |