diff options
author | Tor Arne Vestbø <tor.arne.vestbo@digia.com> | 2013-03-04 14:27:35 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-05 18:39:47 +0100 |
commit | 163dcf2b71f34a12137f200e4af5640e42e5f5e2 (patch) | |
tree | 591fa5082c9bddcfafbc7e43ba06e417274c36b0 /src/corelib/global/qcompilerdetection.h | |
parent | 1c905907688c8d1a150663d3cf0c2dd2c1a93959 (diff) |
Fix build with older Clang versions without __has_extension
Change-Id: I505d3e4ad2fcd56ee229935d8543811a43923273
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/global/qcompilerdetection.h')
-rw-r--r-- | src/corelib/global/qcompilerdetection.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h index a4af8b8899..383d9c9c6e 100644 --- a/src/corelib/global/qcompilerdetection.h +++ b/src/corelib/global/qcompilerdetection.h @@ -157,6 +157,10 @@ # define Q_CC_CLANG # define Q_ASSUME_IMPL(expr) if (expr){} else __builtin_unreachable() # define Q_UNREACHABLE_IMPL() __builtin_unreachable() +# if !defined(__has_extension) +# /* Compatibility with older Clang versions */ +# define __has_extension __has_feature +# endif # else /* Plain GCC */ # if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 |