develooper Front page | perl.perl5.changes | Postings from September 2019

[perl.git] branch blead updated. v5.31.3-139-g238965b4f5

From:
Karl Williamson
Date:
September 13, 2019 03:37
Subject:
[perl.git] branch blead updated. v5.31.3-139-g238965b4f5
Message ID:
E1i8cO3-0007Rp-FV@git.dc.perl.space
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/238965b4f5bba9e8e2693c09675ca8a1a49a4ec7?hp=da006e4432402cea01c9018743467314377e3c1e>

- Log -----------------------------------------------------------------
commit 238965b4f5bba9e8e2693c09675ca8a1a49a4ec7
Author: Karl Williamson <khw@cpan.org>
Date:   Wed Sep 11 16:22:15 2019 -0600

    PATCH: [perl #134405] Compiler warnings in blead
    
    This was caused by functions that should have been deprecated all along,
    and now are.  But they are still called in places.  In most instances
    one deprecated function is a wrapper for another.  In one instance, the
    calling of the function is to just make sure that mathoms.o gets linked
    to.
    
    The solution adopted here, some of which was suggested by Tony Cook, is
    to use #pragmas to silence the warnings.  By doing this around the
    entirety of mathoms.c, future issues will most likely be avoided.  And
    there are unlikely to enough future cases outside of mathoms to cause a
    problem.

-----------------------------------------------------------------------

Summary of changes:
 intrpvar.h | 4 ++++
 mathoms.c  | 6 ++++++
 sv.c       | 5 +++++
 3 files changed, 15 insertions(+)

diff --git a/intrpvar.h b/intrpvar.h
index a4e5864aed..47383ae818 100644
--- a/intrpvar.h
+++ b/intrpvar.h
@@ -804,6 +804,8 @@ PERLVARI(I, clocktick,	long,	0)	/* this many times() ticks in a second */
 /* Hooks to shared SVs and locks. */
 PERLVARI(I, sharehook,	share_proc_t, Perl_sv_nosharing)
 PERLVARI(I, lockhook,	share_proc_t, Perl_sv_nosharing)
+
+GCC_DIAG_IGNORE(-Wdeprecated-declarations)
 #ifdef NO_MATHOMS
 #  define PERL_UNLOCK_HOOK Perl_sv_nosharing
 #else
@@ -812,6 +814,8 @@ PERLVARI(I, lockhook,	share_proc_t, Perl_sv_nosharing)
 #endif
 PERLVARI(I, unlockhook,	share_proc_t, PERL_UNLOCK_HOOK)
 
+GCC_DIAG_RESTORE
+
 PERLVARI(I, threadhook,	thrhook_proc_t,	Perl_nothreadhook)
 
 /* Can shared object be destroyed */
diff --git a/mathoms.c b/mathoms.c
index 65bf267943..8089b79623 100644
--- a/mathoms.c
+++ b/mathoms.c
@@ -71,6 +71,10 @@ C<-Accflags='-DNO_MATHOMS'>
  */
 #else
 
+/* The functions in this file should be able to call other deprecated functions
+ * without a compiler warning */
+GCC_DIAG_IGNORE(-Wdeprecated-declarations)
+
 /* ref() is now a macro using Perl_doref;
  * this version provided for binary compatibility only.
  */
@@ -1785,6 +1789,8 @@ Perl_sv_2pvbyte(pTHX_ SV *sv, STRLEN *const lp)
     return sv_2pvbyte(sv, lp);
 }
 
+GCC_DIAG_RESTORE
+
 #endif /* NO_MATHOMS */
 
 /*
diff --git a/sv.c b/sv.c
index 495ed860b9..e088e5c419 100644
--- a/sv.c
+++ b/sv.c
@@ -10744,7 +10744,12 @@ Perl_sv_setpviv_mg(pTHX_ SV *const sv, const IV iv)
 {
     PERL_ARGS_ASSERT_SV_SETPVIV_MG;
 
+    GCC_DIAG_IGNORE_STMT(-Wdeprecated-declarations);
+
     sv_setpviv(sv, iv);
+
+    GCC_DIAG_RESTORE_STMT;
+
     SvSETMAGIC(sv);
 }
 

-- 
Perl5 Master Repository



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About