develooper Front page | perl.perl5.porters | Postings from May 2019

[perl #134130] New compilation warnings with gcc 9.1.0

Thread Previous
From:
Sergey Aleynikov
Date:
May 23, 2019 09:23
Subject:
[perl #134130] New compilation warnings with gcc 9.1.0
Message ID:
rt-4.0.24-19043-1558603428-897.134130-75-0@perl.org
# New Ticket Created by  Sergey Aleynikov 
# Please include the string:  [perl #134130]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=134130 >


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.0.


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

I get the following warnings when building perl on Debian with gcc 9.1.0

Wformat-overflow:

locale.c: In function ‘Perl__is_cur_LC_category_utf8’:
locale.c:5087:17: warning: ‘%s’ directive argument is null [-Wformat-overflow=]
 5087 |                 Perl_croak(aTHX_
      |                 ^~~~~~~~~~~~~~~~
 5088 |                            "panic: %s: %d: Corrupt
utf8ness_cache: missing"
      |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 5089 |                            " separator %.*s<-- HERE %s\n",
      |                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 5090 |                            __FILE__, __LINE__,
      |                            ~~~~~~~~~~~~~~~~~~~
 5091 |                            (int) (e - PL_locale_utf8ness),
PL_locale_utf8ness,
      |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 5092 |                            e);
      |                            ~~
locale.c:5089:53: note: format string is defined here
 5089 |                            " separator %.*s<-- HERE %s\n",
      |                                                     ^~

Wc++-compat (lots of, here's the pattern):

byte_t.c:322:24: warning: uninitialized const ‘utf8_viscii’ is invalid
in C++ [-Wc++-compat]
  322 | static const encpage_t utf8_viscii[];
      |                        ^~~~~~~~~~~
byte_t.c:1144:24: warning: duplicate declaration of
‘utf8_AdobeStandardEncoding’ is invalid in C++ [-Wc++-compat]
 1144 | static const encpage_t utf8_AdobeStandardEncoding[10] = {
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~
byte_t.c:12:24: note: previous declaration of
‘utf8_AdobeStandardEncoding’ was here
   12 | static const encpage_t utf8_AdobeStandardEncoding[];
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~


[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=core
    severity=low
---
Site configuration information for perl 5.31.0:

Configured by dur-randir at Wed Feb 27 14:51:01 MSK 2019.

Summary of my perl5 (revision 5 version 31 subversion 0) configuration:
  Commit id: 58f4626762668e1c1948832073998af84b2c85d0
  Platform:
    osname=linux
    osvers=4.19.0-5-amd64
    archname=x86_64-linux
    uname='linux dorothy 4.19.0-5-amd64 #1 smp debian 4.19.37-3
(2019-05-15) x86_64 gnulinux '
    config_args='-de -Dusedevel -DDEBUGGING -Dcc=gcc-9'
    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='gcc-9'
    ccflags ='-fwrapv -DDEBUGGING -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 -g'
    cppflags='-fwrapv -DDEBUGGING -fno-strict-aliasing -pipe
-fstack-protector-strong -I/usr/local/include'
    ccversion=''
    gccversion='9.1.0'
    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='gcc-9'
    ldflags =' -fstack-protector-strong -L/usr/local/lib'
    libpth=/usr/local/lib
/usr/lib/gcc/x86_64-linux-gnu/9/include-fixed
/usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu
/lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib
    libs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
    perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
    libc=libc-2.28.so
    so=so
    useshrplib=false
    libperl=libperl.a
    gnulibc_version='2.28'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs
    dlext=so
    d_dlsymun=undef
    ccdlflags='-Wl,-E'
    cccdlflags='-fPIC'
    lddlflags='-shared -O2 -g -L/usr/local/lib -fstack-protector-strong'


Characteristics of this binary (from libperl):
  Compile-time options:
    DEBUGGING
    HAS_TIMES
    PERLIO_LAYERS
    PERL_COPY_ON_WRITE
    PERL_DONT_CREATE_GVSV
    PERL_MALLOC_WRAP
    PERL_OP_PARENT
    PERL_PRESERVE_IVUV
    PERL_USE_DEVEL
    USE_64_BIT_ALL
    USE_64_BIT_INT
    USE_LARGE_FILES
    USE_LOCALE
    USE_LOCALE_COLLATE
    USE_LOCALE_CTYPE
    USE_LOCALE_NUMERIC
    USE_LOCALE_TIME
    USE_PERLIO
    USE_PERL_ATOF
  Built under linux
  Compiled at May 23 2019 12:15:21
  %ENV:
    PERLBREW_BASHRC_VERSION="0.78"
    PERLBREW_HOME="/home/afl/.perlbrew"
    PERLBREW_MANPATH="/home/afl/perlbrew/perls/perl-5.20.2/man"
    PERLBREW_PATH="/home/afl/perlbrew/bin:/home/afl/perlbrew/perls/perl-5.20.2/bin"
    PERLBREW_PERL="perl-5.20.2"
    PERLBREW_ROOT="/home/afl/perlbrew"
    PERLBREW_VERSION="0.78"
  @INC:
    lib
    /usr/local/lib/perl5/site_perl/5.31.0/x86_64-linux
    /usr/local/lib/perl5/site_perl/5.31.0
    /usr/local/lib/perl5/5.31.0/x86_64-linux
    /usr/local/lib/perl5/5.31.0


Thread Previous


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