In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/cb65b68777357c80fe35f4b74d7ac36c7b471b66?hp=4800031444245dc3dac9967b46b4860ff3863d32>

- Log -----------------------------------------------------------------
commit cb65b68777357c80fe35f4b74d7ac36c7b471b66
Author: David Mitchell <[email protected]>
Date:   Mon Dec 17 14:53:11 2012 +0000

    use PERL_UNUSED_VAR rather than PERL_UNUSED_DECL
    
    PERL_UNUSED_DECL doesn't do anything under g++, so doing this silences
    some g++ warnings.
-----------------------------------------------------------------------

Summary of changes:
 pp_ctl.c  |    7 +++++--
 regcomp.h |    4 ++--
 regexec.c |    3 ++-
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/pp_ctl.c b/pp_ctl.c
index cd5033f..199df1f 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -2867,11 +2867,14 @@ PP(pp_goto)
            SAVEFREESV(cv); /* later, undo the 'avoid premature free' hack */
            if (CvISXSUB(cv)) {
                OP* const retop = cx->blk_sub.retop;
-               SV **newsp PERL_UNUSED_DECL;
-               I32 gimme PERL_UNUSED_DECL;
+               SV **newsp;
+               I32 gimme;
                const SSize_t items = AvFILLp(arg) + 1;
                SV** mark;
 
+                PERL_UNUSED_VAR(newsp);
+                PERL_UNUSED_VAR(gimme);
+
                /* put GvAV(defgv) back onto stack */
                EXTEND(SP, items+1); /* @_ could have been extended. */
                Copy(AvARRAY(arg), SP + 1, items, SV*);
diff --git a/regcomp.h b/regcomp.h
index 4e05a9f..dc4dede 100644
--- a/regcomp.h
+++ b/regcomp.h
@@ -862,8 +862,8 @@ re.pm, especially to the documentation.
 
 #ifdef DEBUGGING
 
-#define GET_RE_DEBUG_FLAGS_DECL VOL IV re_debug_flags \
-       PERL_UNUSED_DECL = 0; GET_RE_DEBUG_FLAGS;
+#define GET_RE_DEBUG_FLAGS_DECL VOL IV re_debug_flags  = 0; \
+        PERL_UNUSED_VAR(re_debug_flags); GET_RE_DEBUG_FLAGS;
 
 #define RE_PV_COLOR_DECL(rpv,rlen,isuni,dsv,pv,l,m,c1,c2) \
     const char * const rpv =                          \
diff --git a/regexec.c b/regexec.c
index 0d378b2..cd9e555 100644
--- a/regexec.c
+++ b/regexec.c
@@ -156,7 +156,8 @@ static const char* const non_utf8_target_but_utf8_required
 /* 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 PERL_UNUSED_DECL; \
+       bool throw_away; \
+        PERL_UNUSED_VAR(throw_away); \
        ENTER; save_re_context(); \
        throw_away = CAT2(is_utf8_,class)((const U8*)" "); \
         PERL_UNUSED_VAR(throw_away); \

--
Perl5 Master Repository

Reply via email to