summaryrefslogtreecommitdiff
path: root/XSUB.h
diff options
context:
space:
mode:
Diffstat (limited to 'XSUB.h')
-rw-r--r--XSUB.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/XSUB.h b/XSUB.h
index b611581d59..358a4b7095 100644
--- a/XSUB.h
+++ b/XSUB.h
@@ -88,7 +88,11 @@ is a lexical $_ in scope.
# define XS(name) EXPORT_C void name(pTHX_ CV* cv)
#endif
#ifndef XS
-# define XS(name) void name(pTHX_ CV* cv)
+# if defined(HASATTRIBUTE)
+# define XS(name) void name(pTHX_ CV* cv __attribute__((unused)))
+# else
+# define XS(name) void name(pTHX_ CV* cv)
+# endif
#endif
#define dAX I32 ax = MARK - PL_stack_base + 1