develooper Front page | perl.perl5.porters | Postings from October 2017

[perl #132342] stadtx_hash.h: Silence -Wimplicit-fallthroughcompilation warnings

Thread Previous
From:
James E Keenan
Date:
October 22, 2017 02:25
Subject:
[perl #132342] stadtx_hash.h: Silence -Wimplicit-fallthroughcompilation warnings
Message ID:
rt-4.0.24-21689-1508639129-745.132342-75-0@perl.org
# New Ticket Created by  James E Keenan 
# Please include the string:  [perl #132342]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=132342 >


When building perl with gcc-7.2, many new compiler warnings are thrown. 
During and after the 2017 Perl 5 Core Hackathon, Lukas Mai and Yves 
Orton committed code to silence most of these warnings.  Today I built 
with gcc-7.2 on Ubuntu Linux 16.04 LTS for the first time.  The warnings 
I got are displayed in this smoke test report:

http://perl5.test-smoke.org/report/58805

Those warnings come from these files:

#####
stadtx_hash.h
op.c
cpan/Compress-Raw-Bzip2/bzip2-src/decompress.c
cpan/Compress-Raw-Zlib/zlib-src/infback.c
cpan/Compress-Raw-Zlib/zlib-src/inflate.c
cpan/Encode/Unicode/Unicode.xs
cpan/Scalar-List-Utils/ListUtil.xs
#####

The patch attached silences the 'warning: this statement may fall 
through [-Wimplicit-fallthrough=]' warnings in stadtx_hash.h.  Those 
warnings appear in most of the other files, but those are maintained 
upstream (for which I will later supply patches).

The following warning remains during a gcc-7.2 build:

#####
op.c: In function ‘S_fold_constants’:
op.c:4448:34: warning: argument ‘o’ might be clobbered by ‘longjmp’ or 
‘vfork’ [-Wclobbered]
  S_fold_constants(pTHX_ OP *const o)
                                   ^
#####

I don't yet know how to address that one.

Please review the patch.

Thank you very much.
Jim Keenan


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