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

New compilation warnings in blead (-Wdeprecated-declarations) #17144

Closed
p5pRT opened this issue Sep 3, 2019 · 7 comments
Closed

New compilation warnings in blead (-Wdeprecated-declarations) #17144

p5pRT opened this issue Sep 3, 2019 · 7 comments
Labels
build-time-warnings Replaces [META] Build-time warnings RT #133556 type-core

Comments

@p5pRT
Copy link

p5pRT commented Sep 3, 2019

Migrated from rt.perl.org#134405 (status was 'open')

Searchable as RT134405$

@p5pRT
Copy link
Author

p5pRT commented Sep 3, 2019

From @dur-randir

Created by @dur-randir

After some recent commits to blead, I observe the following new
compilation warnings on mac os with clang​:

In file included from perl.c​:3894​:
./intrpvar.h​:805​:38​: warning​: 'Perl_sv_nosharing' is deprecated
[-Wdeprecated-declarations]
PERLVARI(I, sharehook, share_proc_t, Perl_sv_nosharing)
  ^
perl.c​:3892​:53​: note​: expanded from macro 'PERLVARI'
# define PERLVARI(prefix,var,type,init) PL_##var = init;
  ^
./proto.h​:3488​:20​: note​: 'Perl_sv_nosharing' has been explicitly
marked deprecated here
PERL_CALLCONV void Perl_sv_nosharing(pTHX_ SV *sv)
  ^
In file included from perl.c​:3894​:
./intrpvar.h​:806​:37​: warning​: 'Perl_sv_nosharing' is deprecated
[-Wdeprecated-declarations]
PERLVARI(I, lockhook, share_proc_t, Perl_sv_nosharing)
  ^
perl.c​:3892​:53​: note​: expanded from macro 'PERLVARI'
# define PERLVARI(prefix,var,type,init) PL_##var = init;
  ^
./proto.h​:3488​:20​: note​: 'Perl_sv_nosharing' has been explicitly
marked deprecated here
PERL_CALLCONV void Perl_sv_nosharing(pTHX_ SV *sv)
  ^
In file included from perl.c​:3894​:
./intrpvar.h​:813​:39​: warning​: 'Perl_sv_nounlocking' is deprecated
[-Wdeprecated-declarations]
PERLVARI(I, unlockhook, share_proc_t, PERL_UNLOCK_HOOK)
  ^
./intrpvar.h​:811​:28​: note​: expanded from macro 'PERL_UNLOCK_HOOK'
# define PERL_UNLOCK_HOOK Perl_sv_nounlocking
  ^
perl.c​:3892​:53​: note​: expanded from macro 'PERLVARI'
# define PERLVARI(prefix,var,type,init) PL_##var = init;
  ^
./proto.h​:3492​:20​: note​: 'Perl_sv_nounlocking' has been explicitly
marked deprecated here
PERL_CALLCONV void Perl_sv_nounlocking(pTHX_ SV *sv)

Perl Info

Flags:
    category=core
    severity=low

Site configuration information for perl 5.31.4:

Configured by dur-randir at Tue Sep  3 16:33:41 MSK 2019.

Summary of my perl5 (revision 5 version 31 subversion 4) configuration:
  Commit id: 9d9546e0faa646b5770bb5111bf61259779b0fd7
  Platform:
    osname=darwin
    osvers=13.4.0
    archname=darwin-2level
    uname='darwin isengard.local 13.4.0 darwin kernel version 13.4.0:
mon jan 11 18:17:34 pst 2016; root:xnu-2422.115.15~1release_x86_64
x86_64 '
    config_args='-de -Dusedevel -DDEBUGGING'
    hint=recommended
    useposix=true
    d_sigaction=define
    useithreads=undef
    usemultiplicity=undef
    use64bitint=define
    use64bitall=define
    uselongdouble=undef
    usemymalloc=n
    default_inc_excludes_dot=define
    bincompat5005=undef
  Compiler:
    cc='cc'
    ccflags ='-fno-common -DPERL_DARWIN -mmacosx-version-min=10.9
-DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include -I/opt/local/include -DPERL_USE_SAFE_PUTENV'
    optimize='-O3 -g'
    cppflags='-fno-common -DPERL_DARWIN -mmacosx-version-min=10.9
-DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include -I/opt/local/include'
    ccversion=''
    gccversion='4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.56)'
    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 =' -mmacosx-version-min=10.9 -fstack-protector
-L/usr/local/lib -L/opt/local/lib'
    libpth=/usr/local/lib
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/6.0/lib
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib
/usr/lib /opt/local/lib
    libs=-lpthread -lgdbm -ldbm -ldl -lm -lutil -lc
    perllibs=-lpthread -ldl -lm -lutil -lc
    libc=
    so=dylib
    useshrplib=false
    libperl=libperl.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs
    dlext=bundle
    d_dlsymun=undef
    ccdlflags=' '
    cccdlflags=' '
    lddlflags=' -mmacosx-version-min=10.9 -bundle -undefined
dynamic_lookup -L/usr/local/lib -L/opt/local/lib -fstack-protector'



@INC for perl 5.31.4:
    lib
    /usr/local/lib/perl5/site_perl/5.31.4/darwin-2level
    /usr/local/lib/perl5/site_perl/5.31.4
    /usr/local/lib/perl5/5.31.4/darwin-2level
    /usr/local/lib/perl5/5.31.4


Environment for perl 5.31.4:
    DYLD_LIBRARY_PATH (unset)
    HOME=/Users/dur-randir
    LANG=en_US.UTF-8
    LANGUAGE (unset)
    LC_CTYPE=en_US.UTF-8
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/Users/dur-randir/perlbrew/bin:/Users/dur-randir/perlbrew/perls/perl-5.26.0/bin:/opt/local/bin:/usr/texbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Library/TeX/texbin
    PERLBREW_HOME=/Users/dur-randir/.perlbrew
    PERLBREW_MANPATH=/Users/dur-randir/perlbrew/perls/perl-5.26.0/man
    PERLBREW_PATH=/Users/dur-randir/perlbrew/bin:/Users/dur-randir/perlbrew/perls/perl-5.26.0/bin
    PERLBREW_PERL=perl-5.26.0
    PERLBREW_ROOT=/Users/dur-randir/perlbrew
    PERLBREW_SHELLRC_VERSION=0.86
    PERLBREW_VERSION=0.86
    PERL_BADLANG (unset)
    SHELL=/opt/local/bin/zsh

@p5pRT
Copy link
Author

p5pRT commented Sep 3, 2019

From @jkeenan

On Tue, 03 Sep 2019 18​:18​:06 GMT, randir wrote​:

This is a bug report for perl from sergey.aleynikov@​gmail.com,
generated with the help of perlbug 1.41 running under perl 5.31.4.

Confirmed on Linux and FreeBSD with clang (version 6).

Karl, is this behavior an intended consequence of this commit​:

#####
commit 57f51a6
Author​: Karl Williamson <khw@​cpan.org>
AuthorDate​: Sun Sep 1 02​:03​:04 2019
Commit​: Karl Williamson <khw@​cpan.org>
CommitDate​: Tue Sep 3 03​:52​:10 2019

embed.fnc​: Functions in mathoms are deprecated (unless there is a macro to bypass them)
 
These functions can be removed at any time, and any installation may disallow them. So they are effectively deprecated. Make this explicit.
#####

Thank you very much.

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

@p5pRT
Copy link
Author

p5pRT commented Sep 3, 2019

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

@p5pRT
Copy link
Author

p5pRT commented Sep 3, 2019

From @khwilliamson

Thanks for reporting this
Fixed by

commit 11675f5
Author​: Karl Williamson <khw@​cpan.org>
Date​: Tue Sep 3 14​:19​:26 2019 -0600

  Remove deprecated flag from sv_nosharing.
 
  I recently introduced this by mistake.
--
Karl Williamson

@p5pRT
Copy link
Author

p5pRT commented Sep 3, 2019

@khwilliamson - Status changed from 'open' to 'pending release'

@p5pRT p5pRT closed this as completed Sep 3, 2019
@p5pRT
Copy link
Author

p5pRT commented Sep 7, 2019

From @jkeenan

On Tue, 03 Sep 2019 22​:00​:06 GMT, khw wrote​:

Thanks for reporting this
Fixed by

commit 11675f5
Author​: Karl Williamson <khw@​cpan.org>
Date​: Tue Sep 3 14​:19​:26 2019 -0600

 Remove deprecated flag from sv\_nosharing\.
 
 I  recently introduced this by mistake\.

Karl, I don't think that completely fixed the problem. I'm still seeing '-Wdeprecated_declarations' warnings that were not present in, say, perl-5.31.3 from last month.

On Linux, compiling v5.31.3 with gcc 7.4.0 (as I have been doing for some time), I got​:

#####
$ report-build-warnings make.linux.v5.31.3.gcc74.output.txt
File​: make.linux.v5.31.3.gcc74.output.txt

  Wimplicit-fallthrough= 35
  Wunused-variable 2

#####

But at head I get​:

#####
$ report-build-warnings make.linux.abd18c6d.gcc74.output.txt
File​: make.linux.abd18c6d.gcc74.output.txt

  Wdeprecated-declarations 6
  Wimplicit-fallthrough= 35
  Wunused-variable 2
#####

Those warnings show up here​:

#####
  {
  char => 1,
  group => "Wdeprecated-declarations",
  line => 813,
  source => "intrpvar.h",
  text => "\xE2\x80\x98Perl_sv_nounlocking\xE2\x80\x99 is deprecated",
  },
  {
  char => 5,
  group => "Wdeprecated-declarations",
  line => 10747,
  source => "sv.c",
  text => "\xE2\x80\x98Perl_sv_setpviv\xE2\x80\x99 is deprecated",
  },
  {
  char => 1,
  group => "Wdeprecated-declarations",
  line => 813,
  source => "intrpvar.h",
  text => "\xE2\x80\x98Perl_sv_nounlocking\xE2\x80\x99 is deprecated",
  },
  {
  char => 5,
  group => "Wdeprecated-declarations",
  line => 466,
  source => "mathoms.c",
  text => "\xE2\x80\x98Perl_sv_pvn\xE2\x80\x99 is deprecated",
  },
  {
  char => 5,
  group => "Wdeprecated-declarations",
  line => 502,
  source => "mathoms.c",
  text => "\xE2\x80\x98Perl_sv_pvn\xE2\x80\x99 is deprecated",
  },
  {
  char => 1,
  group => "Wdeprecated-declarations",
  line => 813,
  source => "intrpvar.h",
  text => "\xE2\x80\x98Perl_sv_nounlocking\xE2\x80\x99 is deprecated",
  },
#####

The number of times I get this warning varies with OS and C-compiler. For example, on FreeBSD-11 using clang-6.0.1, I only get this warning 2 times.

Re-opening ticket.

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

@p5pRT
Copy link
Author

p5pRT commented Sep 7, 2019

@jkeenan - Status changed from 'pending release' to 'open'

@toddr toddr removed the khw label Oct 25, 2019
@jkeenan jkeenan added the build-time-warnings Replaces [META] Build-time warnings RT #133556 label Nov 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build-time-warnings Replaces [META] Build-time warnings RT #133556 type-core
Projects
None yet
Development

No branches or pull requests

3 participants