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

GCC 6.1 on Debian build report, a few warnings

From:
Dan Collins
Date:
May 18, 2016 02:58
Subject:
GCC 6.1 on Debian build report, a few warnings
Message ID:
CA+tt54LkPVu-SYZon5Z=7QgdrGTDuEeh-MzAV+AFbJViupnq3Q@mail.gmail.com
Hello porters,

While building a bleadperl under GCC 6.1, I noticed a few compiler
warnings. Not sure if they're new or not.

In the miniperl stage, in util.c

ccache gcc-6.1 -c -DPERL_CORE -fwrapv -DDEBUGGING -fno-strict-aliasing
-pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -g -Wall -Werror=declaration-after-statement -Wextra
-Wc++-compat -Wwrite-strings -Wno-format util.c
util.c: In function ‘Perl_my_vsnprintf’:
util.c:5299:18: warning: ‘sizeof’ on array function parameter ‘ap’ will
return size of ‘__va_list_tag *’ [-Wsizeof-array-argument]
     PERL_UNUSED_ARG(ap);
                  ^
util.c:5293:79: note: declared here
 Perl_my_vsnprintf(char *buffer, const Size_t len, const char *format,
va_list ap)

   ^~
This appears to be an attempt to suppress a -Wunused-parameter that is no
longer working because GCC got clever.

In pp_ctl.c

ccache gcc-6.1 -c -DPERL_CORE -fwrapv -DDEBUGGING -fno-strict-aliasing
-pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -g -Wall -Werror=declaration-after-statement -Wextra
-Wc++-compat -Wwrite-strings -Wno-format pp_ctl.c
pp_ctl.c: In function ‘Perl_pp_goto’:
pp_ctl.c:2782:104: warning: self-comparison always evaluates to false
[-Wtautological-compare]
       EXTEND(SP, items+1); /* @_ could have been extended. */

                            ^

After miniperl has been built, in inflate.c

ccache gcc-6.1 -c  -I./zlib-src -fwrapv -DDEBUGGING -fno-strict-aliasing
-pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -Wall -Werror=declaration-after-statement -Wextra
-Wc++-compat -Wwrite-strings -Wno-format -g   -DVERSION=\"2.069\"
-DXS_VERSION=\"2.069\" -fPIC "-I../.."  -DNO_VIZ -DZ_SOLO
-DGZIP_OS_CODE=3  inflate.c
inflate.c: In function ‘inflateUndermine’:
inflate.c:1487:9: warning: unused parameter ‘subvert’ [-Wunused-parameter]
     int subvert)
         ^~~~~~~
inflate.c: In function ‘inflateMark’:
inflate.c:1507:51: warning: left shift of negative value
[-Wshift-negative-value]
     if (strm == Z_NULL || strm->state == Z_NULL) return -1L << 16;
                                                   ^~

Hope this data point is helpful to you!

Regards,
Dan



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