summaryrefslogtreecommitdiff
path: root/XSUB.h
diff options
context:
space:
mode:
Diffstat (limited to 'XSUB.h')
-rw-r--r--XSUB.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/XSUB.h b/XSUB.h
index b7df5e29fd..9d4aae6249 100644
--- a/XSUB.h
+++ b/XSUB.h
@@ -104,7 +104,7 @@ is a lexical $_ in scope.
# define XS(name) EXPORT_C void name(pTHX_ CV* cv)
#endif
#ifndef XS
-# ifdef HASATTRIBUTE_UNUSED
+# if defined(HASATTRIBUTE_UNUSED) && !defined(__cplusplus)
# define XS(name) void name(pTHX_ CV* cv __attribute__unused__)
# else
# define XS(name) void name(pTHX_ CV* cv)