In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/c707756ebb45d88362c58f12444af0ebe1e24ac1?hp=77ab507a50e98cdaad622ae961429fb3bc4c9c11>

- Log -----------------------------------------------------------------
commit c707756ebb45d88362c58f12444af0ebe1e24ac1
Author: Andy Lester <[email protected]>
Date:   Wed Nov 30 16:39:08 2016 +1100

    Remove support for Splint static source code analyzer
    
    Splint has not been updated since 2007 and doesn’t even build for me.
    As far as I know, I'm the only person who's ever worked with Splint on
    Perl 5.
    
    Here's what changes:
    
    * Makefile target "splint"
    * Macros in XSUB.h and perl.h
    * Support in regen/embed.pl
-----------------------------------------------------------------------

Summary of changes:
 Makefile.SH          | 30 ------------------------------
 XSUB.h               | 21 +++++----------------
 perl.h               |  7 +------
 pod/perlhacktips.pod |  8 ++------
 regen/embed.pl       | 17 +++--------------
 5 files changed, 11 insertions(+), 72 deletions(-)

diff --git a/Makefile.SH b/Makefile.SH
index a094f87..10003fd 100755
--- a/Makefile.SH
+++ b/Makefile.SH
@@ -558,32 +558,6 @@ lintflags = \
     -erroff=E_STATIC_UNUSED \
     -erroff=E_TRUE_LOGICAL_EXPR
 
-splintflags = \
-    -I/usr/lib/gcc/i486-linux-gnu/4.0.2/include/ \
-    -D__builtin_va_list=va_list \
-    -Dsigjmp_buf=jmp_buf \
-    -warnposix \
-    \
-    +boolint \
-    +charintliteral \
-    -fixedformalarray \
-    -mustfreefresh \
-    -nestedextern \
-    -predboolint \
-    -predboolothers \
-    -preproc \
-    -boolops \
-    -shadow \
-    -nullstate \
-    +longintegral \
-    +matchanyintegral \
-    -type \
-    \
-    +line-len 999 \
-    +weak
-
-splintfiles = $(c1)
-
 .c$(OBJ_EXT): 
        @echo `$(CCCMD)` $(PLDLFLAGS) $*.c
        @`$(CCCMD)` $(PLDLFLAGS) $*.c
@@ -1426,10 +1400,6 @@ lint: $(c)
        rm -f *.ln
        lint $(lintflags) -DPERL_CORE -D_REENTRANT -DDEBUGGING 
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(c)
 
-.PHONY: splint
-splint: $(c)
-       splint $(splintflags) -DPERL_CORE -D_REENTRANT -DDEBUGGING 
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(splintfiles)
-
 cscopeflags = -Rb  # Recursive, build-only.
 
 .PHONY:        cscope
diff --git a/XSUB.h b/XSUB.h
index e64bc83..e74abae 100644
--- a/XSUB.h
+++ b/XSUB.h
@@ -93,12 +93,7 @@ is a lexical C<$_> in scope.
 */
 
 #ifndef PERL_UNUSED_ARG
-#  if defined(lint) && defined(S_SPLINT_S) /* www.splint.org */
-#    include <note.h>
-#    define PERL_UNUSED_ARG(x) NOTE(ARGUNUSED(x))
-#  else
-#    define PERL_UNUSED_ARG(x) ((void)x)
-#  endif
+#  define PERL_UNUSED_ARG(x) ((void)x)
 #endif
 #ifndef PERL_UNUSED_VAR
 #  define PERL_UNUSED_VAR(x) ((void)x)
@@ -164,12 +159,7 @@ is a lexical C<$_> in scope.
 
 #define dITEMS I32 items = (I32)(SP - MARK)
 
-#if defined(lint) && defined(S_SPLINT_S) /* www.splint.org */
-#  define dXSARGS \
-       NOTE(ARGUNUSED(cv)) \
-       dSP; dAXMARK; dITEMS
-#else
-#  define dXSARGS \
+#define dXSARGS \
        dSP; dAXMARK; dITEMS
 /* These 3 macros are replacements for dXSARGS macro only in bootstrap.
    They factor out common code in every BOOT XSUB. Computation of vars mark
@@ -177,19 +167,18 @@ is a lexical C<$_> in scope.
    optimized away since BOOT must return &PL_sv_yes by default from xsubpp.
    Note these macros are not drop in replacements for dXSARGS since they set
    PL_xsubfilename. */
-#  define dXSBOOTARGSXSAPIVERCHK  \
+#define dXSBOOTARGSXSAPIVERCHK  \
        I32 ax = XS_BOTHVERSION_SETXSUBFN_POPMARK_BOOTCHECK;    \
        SV **mark = PL_stack_base + ax; dSP; dITEMS
-#  define dXSBOOTARGSAPIVERCHK  \
+#define dXSBOOTARGSAPIVERCHK  \
        I32 ax = XS_APIVERSION_SETXSUBFN_POPMARK_BOOTCHECK;     \
        SV **mark = PL_stack_base + ax; dSP; dITEMS
 /* dXSBOOTARGSNOVERCHK has no API in xsubpp to choose it so do
 #undef dXSBOOTARGSXSAPIVERCHK
 #define dXSBOOTARGSXSAPIVERCHK dXSBOOTARGSNOVERCHK */
-#  define dXSBOOTARGSNOVERCHK  \
+#define dXSBOOTARGSNOVERCHK  \
        I32 ax = XS_SETXSUBFN_POPMARK;  \
        SV **mark = PL_stack_base + ax; dSP; dITEMS
-#endif
 
 #define dXSTARG SV * const targ = ((PL_op->op_private & OPpENTERSUB_HASTARG) \
                             ? PAD_SV(PL_op->op_targ) : sv_newmortal())
diff --git a/perl.h b/perl.h
index 9595b3c..d832db4 100644
--- a/perl.h
+++ b/perl.h
@@ -332,12 +332,7 @@
  * or variables/arguments that are used only in certain configurations.
  */
 #ifndef PERL_UNUSED_ARG
-#  if defined(lint) && defined(S_SPLINT_S) /* www.splint.org */
-#    include <note.h>
-#    define PERL_UNUSED_ARG(x) NOTE(ARGUNUSED(x))
-#  else
-#    define PERL_UNUSED_ARG(x) ((void)sizeof(x))
-#  endif
+#  define PERL_UNUSED_ARG(x) ((void)sizeof(x))
 #endif
 #ifndef PERL_UNUSED_VAR
 #  define PERL_UNUSED_VAR(x) ((void)sizeof(x))
diff --git a/pod/perlhacktips.pod b/pod/perlhacktips.pod
index 5aa0b63..8b3392d 100644
--- a/pod/perlhacktips.pod
+++ b/pod/perlhacktips.pod
@@ -1037,18 +1037,14 @@ and looking at the resulting graph, what does it tell 
about the
 execution and data flows.  As a matter of fact, this is exactly how C
 compilers know to give warnings about dubious code.
 
-=head2 lint, splint
+=head2 lint
 
 The good old C code quality inspector, C<lint>, is available in several
 platforms, but please be aware that there are several different
 implementations of it by different vendors, which means that the flags
 are not identical across different platforms.
 
-There is a lint variant called C<splint> (Secure Programming Lint)
-available from http://www.splint.org/ that should compile on any
-Unix-like platform.
-
-There are C<lint> and <splint> targets in Makefile, but you may have to
+There is a C<lint> target in Makefile, but you may have to
 diddle with the flags (see above).
 
 =head2 Coverity
diff --git a/regen/embed.pl b/regen/embed.pl
index f1b7449..9b432ba 100755
--- a/regen/embed.pl
+++ b/regen/embed.pl
@@ -30,7 +30,6 @@ BEGIN {
     require './regen/embed_lib.pl';
 }
 
-my $SPLINT = 0; # Turn true for experimental splint support 
http://www.splint.org
 my $unflagged_pointers;
 
 #
@@ -95,13 +94,6 @@ my ($embed, $core, $ext, $api) = setup_embed();
 
        warn "$plain_func: s flag is mutually exclusive from the i and p plags"
                                            if $flags =~ /s/ && $flags =~ 
/[ip]/;
-       my $splint_flags = "";
-       if ( $SPLINT && !$commented_out ) {
-           $splint_flags .= '/*@noreturn@*/ ' if $never_returns;
-           if ($can_ignore && ($retval ne 'void') && ($retval !~ /\*/)) {
-               $retval .= " /*\@alt void\@*/";
-           }
-       }
 
        if ($flags =~ /([si])/) {
            my $type;
@@ -111,14 +103,14 @@ my ($embed, $core, $ext, $api) = setup_embed();
            else {
                $type = $1 eq 's' ? "STATIC" : "PERL_STATIC_INLINE";
            }
-           $retval = "$type $splint_flags$retval";
+           $retval = "$type $retval";
        }
        else {
            if ($never_returns) {
-               $retval = "PERL_CALLCONV_NO_RET $splint_flags$retval";
+               $retval = "PERL_CALLCONV_NO_RET $retval";
            }
            else {
-               $retval = "PERL_CALLCONV $splint_flags$retval";
+               $retval = "PERL_CALLCONV $retval";
            }
        }
        $func = full_name($plain_func, $flags);
@@ -150,9 +142,6 @@ my ($embed, $core, $ext, $api) = setup_embed();
                     && ($temp_arg !~ /\w+\s+(\w+)(?:\[\d+\])?\s*$/) ) {
                    warn "$func: $arg ($n) doesn't have a name\n";
                }
-               if ( $SPLINT && $nullok && !$commented_out ) {
-                   $arg = '/*@null@*/ ' . $arg;
-               }
                if (defined $1 && $nn && !($commented_out && !$binarycompat)) {
                    push @names_of_nn, $1;
                }

--
Perl5 Master Repository

Reply via email to