In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/2165bd23259a778c0554f86f5652881f24fdafc9?hp=0c6f4d86ce77533b050038c7513faa7f574ed151>

- Log -----------------------------------------------------------------
commit 2165bd23259a778c0554f86f5652881f24fdafc9
Author: Lukas Mai <l....@web.de>
Date:   Fri Oct 13 19:50:24 2017 +0200

    get rid of "implicit fallthrough" warnings with gcc 7
-----------------------------------------------------------------------

Summary of changes:
 gv.c          | 3 +--
 mg.c          | 1 +
 op.c          | 6 ++++++
 perlio.c      | 4 +---
 pp_ctl.c      | 6 ++++--
 sbox32_hash.h | 3 +++
 sv.c          | 3 +++
 toke.c        | 1 +
 vxs.inc       | 2 +-
 9 files changed, 21 insertions(+), 8 deletions(-)

diff --git a/gv.c b/gv.c
index 5d963328e4..b3b9f7f29f 100644
--- a/gv.c
+++ b/gv.c
@@ -3537,7 +3537,7 @@ Perl_amagic_call(pTHX_ SV *left, SV *right, int method, 
int flags)
             res = &PL_sv_undef;
             SP = PL_stack_base + oldmark;
             break;
-        case G_ARRAY: {
+        case G_ARRAY:
             if (flags & AMGf_want_list) {
                 res = sv_2mortal((SV *)newAV());
                 av_extend((AV *)res, nret);
@@ -3546,7 +3546,6 @@ Perl_amagic_call(pTHX_ SV *left, SV *right, int method, 
int flags)
                 break;
             }
             /* FALLTHROUGH */
-        }
         default:
             res = POPs;
             break;
diff --git a/mg.c b/mg.c
index fe4f8a5935..8c0c1b5dcd 100644
--- a/mg.c
+++ b/mg.c
@@ -994,6 +994,7 @@ Perl_magic_get(pTHX_ SV *sv, MAGIC *mg)
        break;
 #endif  /* End of platforms with special handling for $^E; others just fall
            through to $! */
+    /* FALLTHROUGH */
 
     case '!':
        {
diff --git a/op.c b/op.c
index ebfa04d46e..4e45800876 100644
--- a/op.c
+++ b/op.c
@@ -957,6 +957,7 @@ Perl_op_clear(pTHX_ OP *o)
        SvREFCNT_dec(cMETHOPx(o)->op_rclass_sv);
        cMETHOPx(o)->op_rclass_sv = NULL;
 #endif
+        /* FALLTHROUGH */
     case OP_METHOD_NAMED:
     case OP_METHOD_SUPER:
         SvREFCNT_dec(cMETHOPx(o)->op_u.op_meth_sv);
@@ -1080,12 +1081,14 @@ Perl_op_clear(pTHX_ OP *o)
 
                 case MDEREF_HV_padhv_helem:
                     is_hash = TRUE;
+                    /* FALLTHROUGH */
                 case MDEREF_AV_padav_aelem:
                     pad_free((++items)->pad_offset);
                     goto do_elem;
 
                 case MDEREF_HV_gvhv_helem:
                     is_hash = TRUE;
+                    /* FALLTHROUGH */
                 case MDEREF_AV_gvav_aelem:
 #ifdef USE_ITHREADS
                     S_op_clear_gv(aTHX_ o, &((++items)->pad_offset));
@@ -1096,6 +1099,7 @@ Perl_op_clear(pTHX_ OP *o)
 
                 case MDEREF_HV_gvsv_vivify_rv2hv_helem:
                     is_hash = TRUE;
+                    /* FALLTHROUGH */
                 case MDEREF_AV_gvsv_vivify_rv2av_aelem:
 #ifdef USE_ITHREADS
                     S_op_clear_gv(aTHX_ o, &((++items)->pad_offset));
@@ -1106,6 +1110,7 @@ Perl_op_clear(pTHX_ OP *o)
 
                 case MDEREF_HV_padsv_vivify_rv2hv_helem:
                     is_hash = TRUE;
+                    /* FALLTHROUGH */
                 case MDEREF_AV_padsv_vivify_rv2av_aelem:
                     pad_free((++items)->pad_offset);
                     goto do_vivify_rv2xv_elem;
@@ -1113,6 +1118,7 @@ Perl_op_clear(pTHX_ OP *o)
                 case MDEREF_HV_pop_rv2hv_helem:
                 case MDEREF_HV_vivify_rv2hv_helem:
                     is_hash = TRUE;
+                    /* FALLTHROUGH */
                 do_vivify_rv2xv_elem:
                 case MDEREF_AV_pop_rv2av_aelem:
                 case MDEREF_AV_vivify_rv2av_aelem:
diff --git a/perlio.c b/perlio.c
index 209af1b0f1..122cfccd23 100644
--- a/perlio.c
+++ b/perlio.c
@@ -934,9 +934,7 @@ PerlIO_parse_layers(pTHX_ PerlIO_list_t *av, const char 
*names)
                            if (*e++) {
                                break;
                            }
-                           /*
-                            * Drop through
-                            */
+                            /* Fall through */
                        case '\0':
                            e--;
                            Perl_ck_warner(aTHX_ packWARN(WARN_LAYER),
diff --git a/pp_ctl.c b/pp_ctl.c
index 611dee49a7..249c83c7d4 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -715,6 +715,7 @@ PP(pp_formline)
                SvSETMAGIC(sv);
                break;
            }
+            /* FALLTHROUGH */
 
        case FF_LINESNGL: /* process ^*  */
            chopspace = 0;
@@ -3276,7 +3277,7 @@ Perl_find_runcv_where(pTHX_ U8 cond, IV arg, U32 *db_seqp)
                    return cv;
                case FIND_RUNCV_level_eq:
                    if (level++ != arg) continue;
-                   /* GERONIMO! */
+                    /* FALLTHROUGH */
                default:
                    return cv;
                }
@@ -5377,7 +5378,8 @@ S_doparseform(pTHX_ SV *sv)
            if (s < send) {
                skipspaces = 0;
                 continue;
-            } /* else FALL THROUGH */
+            }
+            /* FALLTHROUGH */
        case '\n':
            arg = s - base;
            skipspaces++;
diff --git a/sbox32_hash.h b/sbox32_hash.h
index 66f27accbc..4413342918 100644
--- a/sbox32_hash.h
+++ b/sbox32_hash.h
@@ -1,6 +1,8 @@
 #ifndef DEBUG_SBOX32_HASH
 #define DEBUG_SBOX32_HASH 0
 
+GCC_DIAG_IGNORE(-Wimplicit-fallthrough)
+
 #include "zaphod32_hash.h"
 
 #if DEBUG_SBOX32_HASH == 1
@@ -1779,5 +1781,6 @@ SBOX32_STATIC_INLINE U32 sbox32_hash128(
     return sbox32_hash_with_state((U8*)state,key,key_len);
 }
 
+GCC_DIAG_RESTORE
 
 #endif
diff --git a/sv.c b/sv.c
index 6dcd99ae59..19deb76a09 100644
--- a/sv.c
+++ b/sv.c
@@ -1645,6 +1645,7 @@ Perl_sv_setiv(pTHX_ SV *const sv, const IV i)
     case SVt_PVGV:
        if (!isGV_with_GP(sv))
            break;
+        /* FALLTHROUGH */
     case SVt_PVAV:
     case SVt_PVHV:
     case SVt_PVCV:
@@ -1758,6 +1759,7 @@ Perl_sv_setnv(pTHX_ SV *const sv, const NV num)
     case SVt_PVGV:
        if (!isGV_with_GP(sv))
            break;
+        /* FALLTHROUGH */
     case SVt_PVAV:
     case SVt_PVHV:
     case SVt_PVCV:
@@ -16908,6 +16910,7 @@ S_find_uninit_var(pTHX_ const OP *const obase, const SV 
*const uninit_sv,
        /* def-ness of rval pos() is independent of the def-ness of its arg */
        if ( !(obase->op_flags & OPf_MOD))
            break;
+        /* FALLTHROUGH */
 
     case OP_SCHOMP:
     case OP_CHOMP:
diff --git a/toke.c b/toke.c
index a91a4fcfbe..6c3148d96a 100644
--- a/toke.c
+++ b/toke.c
@@ -7231,6 +7231,7 @@ Perl_yylex(pTHX)
                orig_keyword = 0;
                lex = 0;
                off = 0;
+            /* FALLTHROUGH */
        default:                        /* not a keyword */
          just_a_word: {
                int pkgname = 0;
diff --git a/vxs.inc b/vxs.inc
index b4aa0c6e24..0e5e72a90b 100644
--- a/vxs.inc
+++ b/vxs.inc
@@ -219,7 +219,7 @@ VXS(version_new)
         SvGETMAGIC(vs);
         if(SvOK(vs))
             break;
-        /* drop through */
+        /* fall through */
     case 1:
         /* no param or explicit undef */
         /* create empty object */

--
Perl5 Master Repository

Reply via email to