On Fri, Jan 21, 2022 at 04:34:13PM +0100, Marc Espie wrote:
> On Fri, Jan 21, 2022 at 02:12:25PM +0100, Alexander Bluhm wrote:
> > Hi,
> > 
> > Since clang 13 each Perl or Perl XS module compile spits out a lot
> > of -Wcompound-token-split-by-macro warnings.  E.g. p5-Net-SSLeay
> > produces 3882 warnings generated.  You cannot spot anything useful.
> > The problem is burried deeply in the Perl macros and copied to
> > everywhere.
> > 
> > If we compile Perl with -Wno-compound-token-split-by-macro it gets
> > stored in Config.pm and is used for most modules.
> > 
> > $ perl -MConfig -e 'print $Config{ccflags},"\n"'
> > -Wno-compound-token-split-by-macro -fno-strict-aliasing 
> > -fno-delete-null-pointer-checks -pipe -fstack-protector-strong 
> > -I/usr/local/include
> > 
> > ok?
> 
> I'm wondering whether this warning makes any sense for the ({ gnu C statement
> (which isn't really a C token per se)
> 
> As for "deep within perl", it comes from a combination of two things:
> 
> - perl.h uses STMT_START and STMT_END (the normal ones just
> creating do {} while (0)   grouping.

Which jsg changed recently for llvm 13 clang to get rid of warnings
building perl itself.
https://github.com/openbsd/src/commit/97a5f6039458a57e6c05bb910c104ac2ecee7622



> - there's a module called Devel::PPPort that generates a ppport.h (normally
> the most recent).
> 
> using
> $ perl -MDevel::PPPort -e'Devel::PPPort::WriteFile'
> 
> as documented in the manpage to regen a more recent ppport.h results in
> p5-Net-SSLeay producing exactly 0 warning while building.
> 
> So I don't really think perl requires any change.
>
> Possibly hacking a bit on ports that use an outdated version of ppport.h

Updating ppport.h seems reasonable to me.

Reply via email to