From 6b484a99d965c44db948171b3de381dc51bd46af Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Tue, 1 Aug 2006 11:46:15 +0300 Subject: [PATCH] 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 --- perl.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/perl.h b/perl.h index ef558a4..3c806e3 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 -- 2.7.4