Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PATCH] Add four NOT_REACHED to quiet warnings #15897

Closed
p5pRT opened this issue Feb 27, 2017 · 9 comments
Closed

[PATCH] Add four NOT_REACHED to quiet warnings #15897

p5pRT opened this issue Feb 27, 2017 · 9 comments

Comments

@p5pRT
Copy link

p5pRT commented Feb 27, 2017

Migrated from rt.perl.org#130872 (status was 'resolved')

Searchable as RT130872$

@p5pRT
Copy link
Author

p5pRT commented Feb 27, 2017

From @petdance

Created by @petdance

Add four NOT_REACHED lines to quiet warnings that come up with clang
-Weverything.

Perl Info

Flags:
    category=core
    severity=low
    Type=Patch
    PatchStatus=HasPatch

Site configuration information for perl 5.24.0:

Configured by andy at Sun Jun  5 23:28:46 CDT 2016.

Summary of my perl5 (revision 5 version 24 subversion 0) configuration:
   
  Platform:
    osname=linux, osvers=3.10.0-327.18.2.el7.x86_64, archname=x86_64-linux
    uname='linux clifford 3.10.0-327.18.2.el7.x86_64 #1 smp thu may 12 11:03:55 utc 2016 x86_64 x86_64 x86_64 gnulinux '
    config_args='-de -Dprefix=/home/andy/perl5/perlbrew/perls/perl-5.24.0 -Aeval:scriptdir=/home/andy/perl5/perlbrew/perls/perl-5.24.0/bin'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=undef, usemultiplicity=undef
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2',
    optimize='-O2',
    cppflags='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
    ccversion='', gccversion='4.8.5 20150623 (Red Hat 4.8.5-4)', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678, doublekind=3
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16, longdblkind=3
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -fstack-protector-strong -L/usr/local/lib'
    libpth=/usr/local/lib /usr/lib /lib/../lib64 /usr/lib/../lib64 /lib /lib64 /usr/lib64 /usr/local/lib64
    libs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
    perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
    libc=libc-2.17.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version='2.17'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector-strong'

Locally applied patches:
    Devel::PatchPerl 1.38


@INC for perl 5.24.0:
    /home/andy/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0/x86_64-linux
    /home/andy/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0
    /home/andy/perl5/perlbrew/perls/perl-5.24.0/lib/5.24.0/x86_64-linux
    /home/andy/perl5/perlbrew/perls/perl-5.24.0/lib/5.24.0
    .


Environment for perl 5.24.0:
    HOME=/home/andy
    LANG=en_US.UTF-8
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/home/andy/perl5/perlbrew/bin:/home/andy/perl5/perlbrew/perls/perl-5.24.0/bin:/home/andy/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin
    PERLBREW_BASHRC_VERSION=0.75
    PERLBREW_HOME=/home/andy/.perlbrew
    PERLBREW_MANPATH=/home/andy/perl5/perlbrew/perls/perl-5.24.0/man
    PERLBREW_PATH=/home/andy/perl5/perlbrew/bin:/home/andy/perl5/perlbrew/perls/perl-5.24.0/bin
    PERLBREW_PERL=perl-5.24.0
    PERLBREW_ROOT=/home/andy/perl5/perlbrew
    PERLBREW_VERSION=0.75
    PERLCRITIC=/home/andy/tw/Dev/perlcriticrc
    PERL_BADLANG (unset)
    SHELL=/bin/bash

@p5pRT
Copy link
Author

p5pRT commented Feb 27, 2017

From @petdance

0001-Add-NOT_REACHED-to-quiet-clang-Weverything-warnings.patch
From a0ac08519f56e859ff7049497cc4e6aadff13e33 Mon Sep 17 00:00:00 2001
From: Andy Lester <andy@petdance.com>
Date: Sun, 26 Feb 2017 21:15:46 -0600
Subject: [PATCH] Add NOT_REACHED to quiet clang -Weverything warnings

---
 gv.c | 1 +
 sv.c | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/gv.c b/gv.c
index 8c85614..915fee8 100644
--- a/gv.c
+++ b/gv.c
@@ -385,6 +385,7 @@ Perl_gv_init_pvn(pTHX_ GV *gv, HV *stash, const char *name, STRLEN len, U32 flag
 	case SVt_PVIO:
             Perl_croak(aTHX_ "Cannot convert a reference to %s to typeglob",
 		       sv_reftype(has_constant, 0));
+            NOT_REACHED; /* NOTREACHED */
             break;
 
 	default: NOOP;
diff --git a/sv.c b/sv.c
index e90ea84..5ae4ce3 100644
--- a/sv.c
+++ b/sv.c
@@ -1651,6 +1651,7 @@ Perl_sv_setiv(pTHX_ SV *const sv, const IV i)
 	/* diag_listed_as: Can't coerce %s to %s in %s */
 	Perl_croak(aTHX_ "Can't coerce %s to integer in %s", sv_reftype(sv,0),
 		   OP_DESC(PL_op));
+        NOT_REACHED; /* NOTREACHED */
         break;
     default: NOOP;
     }
@@ -1763,6 +1764,7 @@ Perl_sv_setnv(pTHX_ SV *const sv, const NV num)
 	/* diag_listed_as: Can't coerce %s to %s in %s */
 	Perl_croak(aTHX_ "Can't coerce %s to number in %s", sv_reftype(sv,0),
 		   OP_DESC(PL_op));
+        NOT_REACHED; /* NOTREACHED */
         break;
     default: NOOP;
     }
@@ -13876,6 +13878,7 @@ S_sv_dup_common(pTHX_ const SV *const sstr, CLONE_PARAMS *const param)
 	    switch (sv_type) {
 	    default:
 		Perl_croak(aTHX_ "Bizarre SvTYPE [%" IVdf "]", (IV)SvTYPE(sstr));
+                NOT_REACHED; /* NOTREACHED */
 		break;
 
 	    case SVt_PVGV:
-- 
1.8.3.1

@p5pRT
Copy link
Author

p5pRT commented Feb 27, 2017

From @jkeenan

On Mon, 27 Feb 2017 03​:26​:23 GMT, petdance wrote​:

This is a bug report for perl from andy@​petdance.com,
generated with the help of perlbug 1.40 running under perl 5.24.0.

-----------------------------------------------------------------
[Please describe your issue here]

Add four NOT_REACHED lines to quiet warnings that come up with clang
-Weverything.

Due to code freeze, consideration of this patch will have to await perl-5.27.1. Linking to the relevant META ticket.

Thank you very much.

--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

p5pRT commented Feb 27, 2017

From [Unknown Contact. See original ticket]

On Mon, 27 Feb 2017 03​:26​:23 GMT, petdance wrote​:

This is a bug report for perl from andy@​petdance.com,
generated with the help of perlbug 1.40 running under perl 5.24.0.

-----------------------------------------------------------------
[Please describe your issue here]

Add four NOT_REACHED lines to quiet warnings that come up with clang
-Weverything.

Due to code freeze, consideration of this patch will have to await perl-5.27.1. Linking to the relevant META ticket.

Thank you very much.

--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

p5pRT commented Feb 27, 2017

From @petdance

Due to code freeze, consideration of this patch will have to await perl-5.27.1. Linking to the relevant META ticket.

No biggie. It's just maintenance.

--
Andy Lester => www.petdance.com

@p5pRT
Copy link
Author

p5pRT commented Jun 1, 2017

From @jkeenan

On Mon, 27 Feb 2017 03​:40​:12 GMT, petdance wrote​:

Due to code freeze, consideration of this patch will have to await
perl-5.27.1. Linking to the relevant META ticket.

No biggie. It's just maintenance.

--
Andy Lester => www.petdance.com

Pushed to blead in commit c9a0dcd. Will monitor for <= 7 days, then close.

Thank you very much.
--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

p5pRT commented Jun 1, 2017

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Jun 7, 2017

From @jkeenan

On Thu, 01 Jun 2017 15​:05​:16 GMT, jkeenan wrote​:

On Mon, 27 Feb 2017 03​:40​:12 GMT, petdance wrote​:

Due to code freeze, consideration of this patch will have to await
perl-5.27.1. Linking to the relevant META ticket.

No biggie. It's just maintenance.

--
Andy Lester => www.petdance.com

Pushed to blead in commit c9a0dcd.
Will monitor for <= 7 days, then close.

Thank you very much.

No adverse reactions observed. The patient is discharged.

Thank you very much.

--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

p5pRT commented Jun 7, 2017

@jkeenan - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant