suggested by NI-S.
p4raw-id: //depot/perl@10561
/* 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
# 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
# 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