From fc899fc5223ca5c9f73758341c92335462495a5e Mon Sep 17 00:00:00 2001 From: Ruben Van Boxem Date: Sun, 30 Oct 2011 12:27:21 +0100 Subject: [PATCH] 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 (cherry picked from commit 310b446a81dd927739e503b03389641f1aa13ab4) Sanity-Review: Qt Sanity Bot --- src/linguist/shared/profileparser.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/linguist/shared/profileparser.h b/src/linguist/shared/profileparser.h index 643e339..ad71e81 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 -- 2.7.4