From: Andy Dougherty Date: Mon, 10 Jul 2006 13:16:27 +0000 (-0400) Subject: Re: [perl #39634] gcc 3.3 has problems with __attribute__((unused)) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d324fe495eb3277e76e453081ddf1dd3441dbd3e;p=p5sagit%2Fp5-mst-13.2.git Re: [perl #39634] gcc 3.3 has problems with __attribute__((unused)) Message-ID: p4raw-id: //depot/perl@28541 --- diff --git a/perl.h b/perl.h index 9c32f96..94eb860 100644 --- a/perl.h +++ b/perl.h @@ -2604,9 +2604,11 @@ typedef struct clone_params CLONE_PARAMS; # define HASATTRIBUTE_PURE # endif # if __GNUC__ == 3 && __GNUC_MINOR__ >= 4 || __GNUC__ > 3 /* 3.4 -> */ - /* This actually works for gcc-3.3, but not for g++-3.3. */ # define HASATTRIBUTE_UNUSED # endif +# if __GNUC__ == 3 && __GNUC_MINOR__ == 3 && !defined(__cplusplus) +# define HASATTRIBUTE_UNUSED /* gcc-3.3, but not g++-3.3. */ +# endif # if __GNUC__ == 3 && __GNUC_MINOR__ >= 4 || __GNUC__ > 3 /* 3.4 -> */ # define HASATTRIBUTE_WARN_UNUSED_RESULT # endif