summaryrefslogtreecommitdiff
path: root/perl.h
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2006-08-01 11:46:15 +0300
committerH.Merijn Brand <h.m.brand@xs4all.nl>2006-08-01 12:13:53 +0000
commit6b484a99d965c44db948171b3de381dc51bd46af (patch)
tree323600e215f7256dcd9c078a1de1ca15256fa41d /perl.h
parent98e3ba2c7915a38045b973577ec684fa0de54948 (diff)
downloadperl-6b484a99d965c44db948171b3de381dc51bd46af.tar.gz
g++ dNOOP (luckily one can mix code and decls in C++)
Somewhat modifies as per Steve Hay's comment Message-Id: <200608010546.k715kEdP017064@kosh.hut.fi> p4raw-id: //depot/perl@28639
Diffstat (limited to 'perl.h')
-rw-r--r--perl.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/perl.h b/perl.h
index ef558a4b93..3c806e3574 100644
--- a/perl.h
+++ b/perl.h
@@ -252,7 +252,11 @@
#endif
#define NOOP /*EMPTY*/(void)0
+#if !defined(HASATTRIBUTE_UNUSED) && defined(__cplusplus)
+#define dNOOP /*EMPTY*/(void)0 /* Older g++ has no __attribute((unused))__ */
+#else
#define dNOOP extern int /*@unused@*/ Perl___notused PERL_UNUSED_DECL
+#endif
#ifndef pTHX
/* Don't bother defining tTHX and sTHX; using them outside