From 97bcb96a9a4541a91e2726eb76d71a0c4bded4ac Mon Sep 17 00:00:00 2001 From: Marcelo Matus Date: Tue, 20 Dec 2005 21:44:56 +0000 Subject: [PATCH] fix unused for 3.3.5 git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8016 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Lib/swiglabels.swg | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Lib/swiglabels.swg b/Lib/swiglabels.swg index 24a7c4c70..66e208ed8 100644 --- a/Lib/swiglabels.swg +++ b/Lib/swiglabels.swg @@ -29,7 +29,14 @@ /* attribute recognised by some compilers to avoid 'unused' warnings */ #ifndef SWIGUNUSED -# if defined(__GNUC__) || defined(__ICC) +# if defined(__GNUC__) +/* Old G++ versions has problems with this attribute, but not GCC */ +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +# elif defined(__ICC) # define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED