From: Jarkko Hietaniemi Date: Wed, 13 Jun 2001 13:44:58 +0000 (+0000) Subject: Hide __attribute__((unused)) behind PERL_UNUSED_DECL as X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=44dbb6954f87e9897f792db3f9f84f1f3ba8701a;p=p5sagit%2Fp5-mst-13.2.git Hide __attribute__((unused)) behind PERL_UNUSED_DECL as suggested by NI-S. p4raw-id: //depot/perl@10561 --- diff --git a/XSUB.h b/XSUB.h index acc0cde..74e37ed 100644 --- a/XSUB.h +++ b/XSUB.h @@ -69,7 +69,7 @@ handled automatically by C. /* gcc -Wall: if an xsub has no arguments and PPCODE is used * and none of ST, XSRETURN or XSprePUSH macros are used * then `ax' (setup by dXSARGS) is unused. */ -#define dAX I32 ax __attribute__((unused)) = MARK - PL_stack_base + 1 +#define dAX I32 ax PERL_UNUSED_DECL = MARK - PL_stack_base + 1 #define dITEMS I32 items = SP - MARK diff --git a/malloc.c b/malloc.c index f73e22d..6a2ff15 100644 --- a/malloc.c +++ b/malloc.c @@ -305,7 +305,7 @@ # define pTHX void # define pTHX_ # ifdef HASATTRIBUTE -# define dTHX extern int Perl___notused __attribute__ ((unused)) +# define dTHX extern int Perl___notused PERL_UNUSED_DECL # else # define dTHX extern int Perl___notused # endif diff --git a/perl.h b/perl.h index fd22a06..43e1150 100644 --- a/perl.h +++ b/perl.h @@ -225,8 +225,14 @@ struct perl_thread; # define CALLPROTECT CALL_FPTR(PL_protect) #endif +#ifdef HASATTRIBUTE +# define PERL_UNUSED_DECL __attribute__((unused)) +#else +# define PERL_UNUSED_DECL +#endif + #define NOOP (void)0 -#define dNOOP extern int Perl___notused __attribute__ ((unused)) +#define dNOOP extern int Perl___notused PERL_UNUSED_DECL #ifndef pTHX # define pTHX void