From 628e9a79f6d7b66c654d3998e8d79ab90ea874cc Mon Sep 17 00:00:00 2001 From: Johan Gustavsson Date: Sat, 13 Feb 2016 13:49:07 +0100 Subject: [PATCH] swiglabels.swg: added check if __GNUC__ is defined It makes sense to check if the preprocessor definition __GNUC__ is defined before using it as a value. --- Lib/swiglabels.swg | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Lib/swiglabels.swg b/Lib/swiglabels.swg index e73e63a57..b3855665e 100644 --- a/Lib/swiglabels.swg +++ b/Lib/swiglabels.swg @@ -65,9 +65,11 @@ #endif /* exporting methods */ -#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) -# ifndef GCC_HASCLASSVISIBILITY -# define GCC_HASCLASSVISIBILITY +#if defined(__GNUC__) +# if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) +# ifndef GCC_HASCLASSVISIBILITY +# define GCC_HASCLASSVISIBILITY +# endif # endif #endif