This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Problem compiling swigged c++ code with 5.8.8
authorMerijn Broeren <merijnb@iloquent.nl>
Wed, 15 Feb 2006 13:51:49 +0000 (14:51 +0100)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Thu, 16 Feb 2006 14:15:53 +0000 (14:15 +0000)
Message-ID: <20060215125148.GA12535@brugman.iloquent.nl>

p4raw-id: //depot/perl@27203

XSUB.h
perl.h

diff --git a/XSUB.h b/XSUB.h
index b7df5e2..9d4aae6 100644 (file)
--- 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)
diff --git a/perl.h b/perl.h
index dccbf01..6f9f966 100644 (file)
--- a/perl.h
+++ b/perl.h
 #endif
 
 #ifndef PERL_UNUSED_DECL
-#  ifdef HASATTRIBUTE_UNUSED
+#  if defined(HASATTRIBUTE_UNUSED) && !defined(__cplusplus)
 #    define PERL_UNUSED_DECL __attribute__unused__
 #  else
 #    define PERL_UNUSED_DECL