From: Jarkko Hietaniemi Date: Tue, 1 Aug 2006 08:46:15 +0000 (+0300) Subject: g++ dNOOP (luckily one can mix code and decls in C++) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6b484a99d965c44db948171b3de381dc51bd46af;p=p5sagit%2Fp5-mst-13.2.git 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 --- 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