silence some gcc -pendantic warnings
authorDavid Mitchell <davem@iabyn.com>
Fri, 19 Jun 2015 13:52:17 +0000 (14:52 +0100)
committerDavid Mitchell <davem@iabyn.com>
Fri, 19 Jun 2015 14:57:14 +0000 (15:57 +0100)
doio.c
dump.c
mg.c
op_reg_common.h
perl.h

diff --git a/doio.c b/doio.c
index 2630252..79ab20c 100644 (file)
--- a/doio.c
+++ b/doio.c
@@ -1106,12 +1106,13 @@ Perl_io_close(pTHX_ IO *io, GV *gv, bool not_implicit, bool warn_on_fail)
                Perl_ck_warner_d(aTHX_ packWARN(WARN_IO),
                                "Warning: unable to close filehandle %"
                                 HEKf" properly: %"SVf,
-                                GvNAME_HEK(gv), get_sv("!",GV_ADD));
+                                HEKfARG(GvNAME_HEK(gv)),
+                                 SVfARG(get_sv("!",GV_ADD)));
            else
                Perl_ck_warner_d(aTHX_ packWARN(WARN_IO),
                                "Warning: unable to close filehandle "
                                "properly: %"SVf,
-                                get_sv("!",GV_ADD));
+                                SVfARG(get_sv("!",GV_ADD)));
        }
     }
     else if (not_implicit) {
diff --git a/dump.c b/dump.c
index bd9d12c..d501cef 100644 (file)
--- a/dump.c
+++ b/dump.c
@@ -2317,7 +2317,7 @@ S_append_gv_name(pTHX_ GV *gv, SV *out)
     }
     sv = newSV(0);
     gv_fullname4(sv, gv, NULL, FALSE);
-    Perl_sv_catpvf(aTHX_ out, "%c%-p", '$', sv);
+    Perl_sv_catpvf(aTHX_ out, "$%"SVf, SVfARG(sv));
     SvREFCNT_dec_NN(sv);
 }
 
@@ -2524,8 +2524,8 @@ Perl_debop(pTHX_ const OP *o)
         break;
 
     case OP_MULTIDEREF:
-        PerlIO_printf(Perl_debug_log, "(%-p)",
-            multideref_stringify(o, deb_curcv(cxstack_ix)));
+        PerlIO_printf(Perl_debug_log, "(%"SVf")",
+            SVfARG(multideref_stringify(o, deb_curcv(cxstack_ix))));
         break;
 
     default:
diff --git a/mg.c b/mg.c
index 064a1ae..054d839 100644 (file)
--- a/mg.c
+++ b/mg.c
@@ -3279,7 +3279,7 @@ Perl_sighandler(int sig)
        if (hek)
            Perl_ck_warner(aTHX_ packWARN(WARN_SIGNAL),
                                "SIG%s handler \"%"HEKf"\" not defined.\n",
-                                PL_sig_name[sig], hek);
+                                PL_sig_name[sig], HEKfARG(hek));
             /* diag_listed_as: SIG%s handler "%s" not defined */
        else Perl_ck_warner(aTHX_ packWARN(WARN_SIGNAL),
                           "SIG%s handler \"__ANON__\" not defined.\n",
index 6b5841e..c500aa4 100644 (file)
@@ -104,8 +104,10 @@ get_regex_charset(const U32 flags)
 #define RXf_PMf_COMPILETIME    (RXf_PMf_MULTILINE|RXf_PMf_SINGLELINE|RXf_PMf_FOLD|RXf_PMf_EXTENDED|RXf_PMf_EXTENDED_MORE|RXf_PMf_KEEPCOPY|RXf_PMf_NOCAPTURE|RXf_PMf_CHARSET|RXf_PMf_STRICT)
 #define RXf_PMf_FLAGCOPYMASK   (RXf_PMf_COMPILETIME|RXf_PMf_SPLIT)
 
-#if 0   /* Temporary to get Jenkins happy again */
-See thread starting at http://nntp.perl.org/group/perl.perl5.porters/220710
+/* Temporary to get Jenkins happy again
+ * See thread starting at http://nntp.perl.org/group/perl.perl5.porters/220710
+ */
+#if 0
     /* Exclude win32 because it can't cope with I32_MAX definition */
 #ifndef WIN32
 #   if RXf_PMf_COMPILETIME > I32_MAX
diff --git a/perl.h b/perl.h
index fdbad6a..bc54d0b 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -3526,7 +3526,10 @@ typedef pthread_key_t    perl_key;
    builtin in C++11.
 */
 /* IBM XL C V11 does not support _Static_assert, no matter what <assert.h> says */
-#  define STATIC_ASSERT_GLOBAL(COND) static_assert(COND, #COND)
+#  define STATIC_ASSERT_GLOBAL(COND) \
+    GCC_DIAG_IGNORE(-Wpedantic); \
+    static_assert(COND, #COND); \
+    GCC_DIAG_RESTORE;
 #else
 /* We use a bit-field instead of an array because gcc accepts
    'typedef char x[n]' where n is not a compile-time constant.
@@ -5552,7 +5555,7 @@ EXTCONST bool PL_valid_types_NV_set[];
  */
 
 /* The quadmath literals are anon structs which -Wc++-compat doesn't like. */
-GCC_DIAG_IGNORE(-Wc++-compat);
+GCC_DIAG_IGNORE(-Wc++-compat)
 
 #  ifdef USE_QUADMATH
 /* Cannot use HUGE_VALQ for PL_inf because not a compile-time
@@ -5622,7 +5625,7 @@ INFNAN_NV_U8_DECL PL_nan = { 0.0/0.0 }; /* keep last */
 #    endif
 #  endif
 
-GCC_DIAG_RESTORE;
+GCC_DIAG_RESTORE
 
 #else