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