From a32682f17668490c0bbde06a120a47372eb9dea2 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Tue, 6 Aug 2013 00:21:46 +0200 Subject: [PATCH] Fix gcc pragmas, part 2. * src/truetype/ttinterp.c (TT_MulFix14_long_long, TT_DotFix14_long_long): `#pragma gcc diagnostic {push,pop}' has been introduced with gcc version 4.6. --- ChangeLog | 8 ++++++++ src/truetype/ttinterp.c | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/ChangeLog b/ChangeLog index d264471d1..3cfbcb16f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2013-08-05 Werner Lemberg + + Fix gcc pragmas, part 2. + + * src/truetype/ttinterp.c (TT_MulFix14_long_long, + TT_DotFix14_long_long): `#pragma gcc diagnostic {push,pop}' has been + introduced with gcc version 4.6. + 2013-08-05 Werner Lemberg Fix gcc pragmas. diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c index aefeaa28c..14854d911 100644 --- a/src/truetype/ttinterp.c +++ b/src/truetype/ttinterp.c @@ -1495,7 +1495,9 @@ #define TT_MulFix14 TT_MulFix14_long_long /* Temporarily disable the warning that C90 doesn't support `long long'. */ +#if ( __GNUC__ * 100 + __GNUC_MINOR__ ) >= 406 #pragma GCC diagnostic push +#endif #pragma GCC diagnostic ignored "-Wlong-long" /* This is declared `noinline' because inlining the function results */ @@ -1520,7 +1522,9 @@ return (FT_Int32)( ret >> 14 ); } +#if ( __GNUC__ * 100 + __GNUC_MINOR__ ) >= 406 #pragma GCC diagnostic pop +#endif #endif /* __GNUC__ && ( __i386__ || __x86_64__ ) */ @@ -1571,7 +1575,9 @@ #define TT_DotFix14 TT_DotFix14_long_long +#if ( __GNUC__ * 100 + __GNUC_MINOR__ ) >= 406 #pragma GCC diagnostic push +#endif #pragma GCC diagnostic ignored "-Wlong-long" static __attribute__(( pure )) FT_Int32 @@ -1595,7 +1601,9 @@ } +#if ( __GNUC__ * 100 + __GNUC_MINOR__ ) >= 406 #pragma GCC diagnostic pop +#endif #endif /* __GNUC__ && (__arm__ || __i386__ || __x86_64__) */