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

[perl #133223] Build-time warnings when compiling with clang 6.0.0

Thread Previous
From:
James E Keenan via RT
Date:
January 6, 2019 02:48
Subject:
[perl #133223] Build-time warnings when compiling with clang 6.0.0
Message ID:
rt-4.0.24-11029-1546742887-795.133223-15-0@perl.org
On Fri, 25 May 2018 19:44:46 GMT, jkeenan wrote:
> On Fri, 25 May 2018 14:41:25 GMT, jkeenan wrote:
> > On Fri, 25 May 2018 14:24:54 GMT, davem wrote:
> > > On Fri, May 25, 2018 at 06:42:28AM -0700, James E Keenan (via RT)
> > > wrote:
> > > > I'll leave it up to the pumpking as to whether this should be a
> > > > blocker
> > > > for 5.28.0.  There are more important blockers, to be sure, but
> > > > it
> > > > would
> > > > also be unfortunate to do a release where we have so many build-
> > > > time
> > > > warnings that we could have dealt with earlier in the cycle had
> > > > we
> > > > been
> > > > testing with this version of the C-compiler.
> > >
> > > There are 69 warnings, all identical, and all resulting from the
> > > same
> > > two
> > > macro definitions: pWARN_ALL and pWARN_NONE.
> > >
> > > The warnings are harmless, and we would almost certainly do more
> > > damage at
> > > this late stage by trying to tweak the macros to silence the
> > > warnings.
> > >
> > >
> >
> > Okay, I'll mark this to hold for 5.29.0.  FWIW, using clang *5* on
> > Linux generated 0 build-time warnings.  (clang 6 not yet available in
> > my Linux distro.)
> >
> > Thank you very much.
> 
> FreeBSD-12.0-CURRENT (development) appears to use clang-6.0.0, so we
> can use the smoke-testing rig used in the following report as a gauge
> of (any) progress on this matter.
> 
> http://perl5.test-smoke.org/report/66194

I believe that revisions made in the following commit address the problem:

#####
commit 8c165a32b7cc4f2a147a37c920a96f1b09b2386d
Author:     Karl Williamson <khw@cpan.org>
AuthorDate: Sun Dec 30 23:29:07 2018
Commit:     Karl Williamson <khw@cpan.org>
CommitDate: Sat Jan 5 12:42:26 2019

regen/warnings.pl: Fix undefined C behavior
    
This fixes compiler warnings "performing pointer arithmetic on a null pointer has undefined behavior"
    
There are several ways to fix this.  This one was suggested by Tomasz Konojacki++.  Instead of trying to point to address 1 and 2, two variables are created, and we point to them.  const is cast away.
#####

See also p5p thread beginning here:

https://www.nntp.perl.org/group/perl.perl5.porters/2018/12/msg253267.html

I'm waiting on some smoke tests before closing.

Thank you very much.

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

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=133223

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