Change __attribute_unused__ to PERL_UNUSED_DECL
authorKarl Williamson <public@khwilliamson.com>
Wed, 9 Nov 2011 15:29:58 +0000 (08:29 -0700)
committerKarl Williamson <public@khwilliamson.com>
Wed, 9 Nov 2011 16:04:33 +0000 (09:04 -0700)
The latter is the Perl standard way of making this declaration

pp_ctl.c
regcomp.h
regexec.c

index 8a80792..85ee20f 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -2884,8 +2884,8 @@ PP(pp_goto)
            SAVEFREESV(cv); /* later, undo the 'avoid premature free' hack */
            if (CvISXSUB(cv)) {
                OP* const retop = cx->blk_sub.retop;
-               SV **newsp __attribute__unused__;
-               I32 gimme __attribute__unused__;
+               SV **newsp PERL_UNUSED_DECL;
+               I32 gimme PERL_UNUSED_DECL;
                if (reified) {
                    I32 index;
                    for (index=0; index<items; index++)
index 6826ae0..81c8a5d 100644 (file)
--- a/regcomp.h
+++ b/regcomp.h
@@ -837,7 +837,7 @@ re.pm, especially to the documentation.
 #ifdef DEBUGGING
 
 #define GET_RE_DEBUG_FLAGS_DECL VOL IV re_debug_flags \
-       __attribute__unused__ = 0; GET_RE_DEBUG_FLAGS;
+       PERL_UNUSED_DECL = 0; GET_RE_DEBUG_FLAGS;
 
 #define RE_PV_COLOR_DECL(rpv,rlen,isuni,dsv,pv,l,m,c1,c2) \
     const char * const rpv =                          \
index f0ecf29..f464df5 100644 (file)
--- a/regexec.c
+++ b/regexec.c
 /* Doesn't do an assert to verify that is correct */
 #define LOAD_UTF8_CHARCLASS_NO_CHECK(class) STMT_START { \
     if (!CAT2(PL_utf8_,class)) { \
-       bool throw_away __attribute__unused__; \
+       bool throw_away PERL_UNUSED_DECL; \
        ENTER; save_re_context(); \
        throw_away = CAT2(is_utf8_,class)((const U8*)" "); \
        LEAVE; } } STMT_END