diff options
-rw-r--r-- | XSUB.h | 2 | ||||
-rw-r--r-- | malloc.c | 2 | ||||
-rw-r--r-- | perl.h | 8 |
3 files changed, 9 insertions, 3 deletions
@@ -69,7 +69,7 @@ handled automatically by C<xsubpp>. /* 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 @@ -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 @@ -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 |