diff options
author | Ruben Van Boxem <vanboxem.ruben@gmail.com> | 2011-10-30 12:27:21 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-12-13 19:39:44 +0100 |
commit | fc899fc5223ca5c9f73758341c92335462495a5e (patch) | |
tree | c57be01b0b043a086f98b11a4132bf0610e5a5eb | |
parent | aa56eaa87789941540a97c816b4e6d911875e6cd (diff) | |
download | qttools-fc899fc5223ca5c9f73758341c92335462495a5e.tar.gz |
Work around MinGW GCC version >=4.5 always_inline+dllexport bug.
Use regular inline instead of always_inline for MinGW GCC build. GCC 4.5
and later spit out an error on always_inline dllexport functions, which
breaks the build for these versions of GCC (see bug 5938).
Change-Id: I444380ff98071b4653a91d074494ace579b4a622
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
(cherry picked from commit 310b446a81dd927739e503b03389641f1aa13ab4)
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
-rw-r--r-- | src/linguist/shared/profileparser.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/linguist/shared/profileparser.h b/src/linguist/shared/profileparser.h index 643e339b3..ad71e8196 100644 --- a/src/linguist/shared/profileparser.h +++ b/src/linguist/shared/profileparser.h @@ -52,7 +52,8 @@ #endif // Be fast even for debug builds -#ifdef __GNUC__ +// MinGW GCC 4.5+ has a problem with always_inline putTok and putBlockLen +#if defined(__GNUC__) && !(defined(__MINGW32__) && __GNUC__ == 4 && __GNUC_MINOR__ >= 5) # define ALWAYS_INLINE inline __attribute__((always_inline)) #elif defined(_MSC_VER) # define ALWAYS_INLINE __forceinline |