Front page | perl.perl5.changes |
Postings from March 2023
[Perl/perl5] 494d51: perl.h - silence certain warnings on HPUXglobally.
From:
Yves Orton via perl5-changes
Date:
March 25, 2023 11:39
Subject:
[Perl/perl5] 494d51: perl.h - silence certain warnings on HPUXglobally.
Message ID:
Perl/perl5/push/refs/heads/yves/hpux_build_warning_suppression/d27f11-7363d2@github.com
Branch: refs/heads/yves/hpux_build_warning_suppression
Home: https://github.com/Perl/perl5
Commit: 494d518815ff95da7811fc3ffd02e826f37dffd2
https://github.com/Perl/perl5/commit/494d518815ff95da7811fc3ffd02e826f37dffd2
Author: Yves Orton <demerphq@gmail.com>
Date: 2023-03-25 (Sat, 25 Mar 2023)
Changed paths:
M handy.h
M perl.h
Log Message:
-----------
perl.h - silence certain warnings on HPUX globally.
There are two warnings classes which account for a very large number of
the warnings produced when building on HPUX Itanium. We know the cause
of these warnings and we are ok with ignoring them.
One set comes from our memory wrap checks, where we end up doing a
comparison against constants in certain conditions. See the comments in
handy.h line 2723 related to PERL_MALLOC_WRAP.
The other set comes from our common "trick" of doing OO in C code with
casting. This is the foundation of how we manage SV types and how we
manage regular expression ops (regops).
If this logic really was a problem then we would have lots of test
failures and segfaults, and we do not, so we can silence them.
Commit: af1e4c24c47db9c38bfaae617b7081b477aecb74
https://github.com/Perl/perl5/commit/af1e4c24c47db9c38bfaae617b7081b477aecb74
Author: Yves Orton <demerphq@gmail.com>
Date: 2023-03-25 (Sat, 25 Mar 2023)
Changed paths:
M regcomp.h
Log Message:
-----------
regcomp.h - use different struct member names for U8 vs U32 str_len
It is confusing to have two different members, at different struct
offsets and with different sizes, with the same name. So rename them
so they have different names that include their size so it is obvious
what is going on.
Commit: 7ec67418a0c08b862b8555899f1459e08592dc7c
https://github.com/Perl/perl5/commit/7ec67418a0c08b862b8555899f1459e08592dc7c
Author: Yves Orton <demerphq@gmail.com>
Date: 2023-03-25 (Sat, 25 Mar 2023)
Changed paths:
M regcomp.c
M regcomp.h
M regcomp_debug.c
M regcomp_study.c
M regcomp_trie.c
M regexec.c
M regexp.h
Log Message:
-----------
regcomp.h - use a common union for head and args across all regnodes.
This helps with HPUX builds where we need to ensure everything
is aligned the same (on 32 bit boundaries). It also strongly
encourages everything to use the accessor macros and not access
the members directly.
By using a union for the variadic fields we make it more obvious
that some regops use the field in different ways. This patch
also converts all the arg unions into a standardized union with
standardized member names.
Commit: 7e01f3d18e3ca1a7519fcb55573d93c05255e04b
https://github.com/Perl/perl5/commit/7e01f3d18e3ca1a7519fcb55573d93c05255e04b
Author: Yves Orton <demerphq@gmail.com>
Date: 2023-03-25 (Sat, 25 Mar 2023)
Changed paths:
M peep.c
Log Message:
-----------
peep.c - ensure deferred_queue is initialized before use
HPUX was warning that it can be used before it is initialized.
There is no cost to nulling it out early so do so.
Commit: f79739c4d0503f9e5e1d8bf13d8fc1cec43a8c7f
https://github.com/Perl/perl5/commit/f79739c4d0503f9e5e1d8bf13d8fc1cec43a8c7f
Author: Yves Orton <demerphq@gmail.com>
Date: 2023-03-25 (Sat, 25 Mar 2023)
Changed paths:
M op.c
Log Message:
-----------
op.c - deal with not-reached statement warning
Change this to test on o, and if it goes null to panic.
We used to assume that o was a valid pointer and loop infinitely,
but this meant that the old return statement at the bottom of
function was never reached.
Commit: ee72cd4d2b7794fd50024730f789e14fb9d9e939
https://github.com/Perl/perl5/commit/ee72cd4d2b7794fd50024730f789e14fb9d9e939
Author: Yves Orton <demerphq@gmail.com>
Date: 2023-03-25 (Sat, 25 Mar 2023)
Changed paths:
M pp_sys.c
Log Message:
-----------
pp_sys.c - suppress warning about comparison to unsigned value
Commit: 3058e7da9807841a3bde916e8cd500eddd8559ad
https://github.com/Perl/perl5/commit/3058e7da9807841a3bde916e8cd500eddd8559ad
Author: Yves Orton <demerphq@gmail.com>
Date: 2023-03-25 (Sat, 25 Mar 2023)
Changed paths:
M regcomp.c
Log Message:
-----------
regcomp.c - simplify logic to eliminate unreached code
We always goto out of this if, so eliminate the unreached code
and also eliminate the useless else block.
Commit: 20a0c29cf05e214de9c72ffc1c93c391979a679d
https://github.com/Perl/perl5/commit/20a0c29cf05e214de9c72ffc1c93c391979a679d
Author: Yves Orton <demerphq@gmail.com>
Date: 2023-03-25 (Sat, 25 Mar 2023)
Changed paths:
M regexec.c
Log Message:
-----------
regexec.c - mark the bottom of a sub as never reached
We used to have a return statement here that picky compilers
would complain about.
Commit: a1ebe9fece6e483a03f322e4b7fa428b47684fb1
https://github.com/Perl/perl5/commit/a1ebe9fece6e483a03f322e4b7fa428b47684fb1
Author: Yves Orton <demerphq@gmail.com>
Date: 2023-03-25 (Sat, 25 Mar 2023)
Changed paths:
M hv.c
M perl.c
M sv.c
Log Message:
-----------
sv.c - don't cast SVTYPEMASK to svtype.
svtype is an enum with 18 values. SVTYPEMASK is 31. A picky
compiler will complain that casting 31 to a svtype is an error.
Casting both sides to a U8 should silence this.
Commit: ba9e9c7e4e81be8477513ffba992506bf40453e5
https://github.com/Perl/perl5/commit/ba9e9c7e4e81be8477513ffba992506bf40453e5
Author: Yves Orton <demerphq@gmail.com>
Date: 2023-03-25 (Sat, 25 Mar 2023)
Changed paths:
M Porting/cmpVERSION.pl
Log Message:
-----------
Porting/cmpVERSION.pl - deal with old git clients better in tag date parsing
The HPUX box we smoke on does not have a modern git and chokes
on taggerdate:unix, so we use taggerdata:iso8601 instead, and
then parse the date with Time::Local.
Commit: 848eab3334758dd24d4a6d5383d8862b8b4077c2
https://github.com/Perl/perl5/commit/848eab3334758dd24d4a6d5383d8862b8b4077c2
Author: Yves Orton <demerphq@gmail.com>
Date: 2023-03-25 (Sat, 25 Mar 2023)
Changed paths:
M t/op/sprintf2.t
Log Message:
-----------
t/op/sprintf2 - TODO a failing test for now
The failure of this test usually signifies that the libc implementation
upon which perl's %g formatting relies is broken. In such cases the test
should probably be todo'd or skipped.
See: https://github.com/Perl/perl5/issues/20953#issuecomment-1478744988
Fixes: #20953
Commit: c85237838d704d982b95a40436ee064edaa6e6c4
https://github.com/Perl/perl5/commit/c85237838d704d982b95a40436ee064edaa6e6c4
Author: Yves Orton <demerphq@gmail.com>
Date: 2023-03-25 (Sat, 25 Mar 2023)
Changed paths:
M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm
M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Constants.pm
M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/CountLines.pm
M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Eval.pm
M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Utilities.pm
M dist/ExtUtils-ParseXS/lib/perlxs.pod
M dist/ExtUtils-ParseXS/t/001-basic.t
Log Message:
-----------
ExtUtils-ParseXS - silence warnings about unreached code in generated XS code
On HPUX we get a lot of:
"APItest.c", line 4004: warning #2111-D: statement is unreachable: PUTBACK
because people have used something like XSRETURN(1); and we generate
code that does PUTBACK; return; Adding a pragma to silence it makes the builds
happier;
Commit: fcb3051cb90d0576887cb449de29366ea76956e5
https://github.com/Perl/perl5/commit/fcb3051cb90d0576887cb449de29366ea76956e5
Author: Yves Orton <demerphq@gmail.com>
Date: 2023-03-25 (Sat, 25 Mar 2023)
Changed paths:
M regcomp.c
Log Message:
-----------
regcomp.c - eliminate assignment in while condition
This gives covertiy heartburn, and also makes the HPUX compiler
whine. Reworking it so that it is a while 1 and the condition determines
if we break out of the loop resolves the heartburn and makes for more
readable code.
Commit: 92440f619d307ca4d5cc15ad67f2573b23b17e6d
https://github.com/Perl/perl5/commit/92440f619d307ca4d5cc15ad67f2573b23b17e6d
Author: Yves Orton <demerphq@gmail.com>
Date: 2023-03-25 (Sat, 25 Mar 2023)
Changed paths:
M numeric.c
Log Message:
-----------
numeric.c - change logical && to bitwise & in nantype test
This appears to have been broken since 2015, found by HPUX compiler warnings:
"numeric.c", line 927: warning #4277-D: logical AND with a constant, do you
mean to use '&'?
!(nantype && IS_NUMBER_IN_UV)) {
Commit: 0369d59aa4cf5a6bc70e9645ce03aa99def6364e
https://github.com/Perl/perl5/commit/0369d59aa4cf5a6bc70e9645ce03aa99def6364e
Author: Yves Orton <demerphq@gmail.com>
Date: 2023-03-25 (Sat, 25 Mar 2023)
Changed paths:
M dist/Devel-PPPort/PPPort_pm.PL
M dist/Devel-PPPort/parts/inc/misc
Log Message:
-----------
Devel-PPPort - deal with signed klen in check_HeUTF8
Some of the HV logic uses a negative key length to indicate utf8
keys, and this logic was using an unsigned keylength, which obviously
does not work
Commit: 37cce7ea84aee6164be42d489de7900e46a23c27
https://github.com/Perl/perl5/commit/37cce7ea84aee6164be42d489de7900e46a23c27
Author: Yves Orton <demerphq@gmail.com>
Date: 2023-03-25 (Sat, 25 Mar 2023)
Changed paths:
M perlio.c
Log Message:
-----------
perlio.c - double cast PerlIO_lockcnt()
This avoids various warnings about alignment on HPUX.
Commit: a9be361d28076c8b92a2e089a7b7b62764e4e153
https://github.com/Perl/perl5/commit/a9be361d28076c8b92a2e089a7b7b62764e4e153
Author: Yves Orton <demerphq@gmail.com>
Date: 2023-03-25 (Sat, 25 Mar 2023)
Changed paths:
M util.c
Log Message:
-----------
util.c - assign HS_GETXSVERLEN() to var before assert
This makes it easier to see the value with gdb, and also avoids an
assignment in the if condition body.
Commit: b9701ecbbdb5e7410456cb59ea89777f1c7642fd
https://github.com/Perl/perl5/commit/b9701ecbbdb5e7410456cb59ea89777f1c7642fd
Author: Yves Orton <demerphq@gmail.com>
Date: 2023-03-25 (Sat, 25 Mar 2023)
Changed paths:
M embed.fnc
M embed.h
M proto.h
M util.c
Log Message:
-----------
util.c - avoid warning about truncated pointer value
This code is part of the fallback rng initialization, it should
only be used in odd circumstances, and it is intended to be "random"ish,
so the logic change should not be a problem.
This more or less reverts commit 4b4c4ab35e70f005167c863eae6d2003492c393c,
although the S_ptr_hash() now lives in util.c instead of hv.c.
Turns out having a decent pointer hash /is/ useful.
Commit: b6b7d75b075de8fd471a1bf17cd4974ea44894ab
https://github.com/Perl/perl5/commit/b6b7d75b075de8fd471a1bf17cd4974ea44894ab
Author: Yves Orton <demerphq@gmail.com>
Date: 2023-03-25 (Sat, 25 Mar 2023)
Changed paths:
M intrpvar.h
Log Message:
-----------
intrpvar.h - silence deprcation warning on HPUX
We were already silencing it on GCC, so lets add HPUX to the party.
Unfortunately I have not figured out a way to have a nice neat define
for it like we have for GCC or MSVC. :-(
Silences this:
"intrpvar.h", line 941: warning #3215-D: function "Perl_sv_nounlocking"
(declared at line 5934 of "proto.h") was declared deprecated
PERLVARI(I, unlockhook, share_proc_t, PERL_UNLOCK_HOOK)
^
We probably should add the same for MSVC as well.
Commit: d3c0ae1e342a39d97c0582f92a7d2037c1c2ec12
https://github.com/Perl/perl5/commit/d3c0ae1e342a39d97c0582f92a7d2037c1c2ec12
Author: Yves Orton <demerphq@gmail.com>
Date: 2023-03-25 (Sat, 25 Mar 2023)
Changed paths:
M intrpvar.h
Log Message:
-----------
intrpvar - ignore deprecated warning on MSVC as well
Commit: 1fa09f08319b8930d629f560b97f8514cfe6686c
https://github.com/Perl/perl5/commit/1fa09f08319b8930d629f560b97f8514cfe6686c
Author: Yves Orton <demerphq@gmail.com>
Date: 2023-03-25 (Sat, 25 Mar 2023)
Changed paths:
M dist/threads/lib/threads.pm
M dist/threads/threads.xs
Log Message:
-----------
dist/threads - use pure pragma form of CLANG_DIAG_IGNORE in threads.xs
Otherwise on HPUX we get warnings
"threads.xs", line 1057: warning #2111-D: statement is unreachable
CLANG_DIAG_IGNORE_STMT(-Wthread-safety);
Commit: bd346fa4939f25fe99d927de3f96065076a318d7
https://github.com/Perl/perl5/commit/bd346fa4939f25fe99d927de3f96065076a318d7
Author: Yves Orton <demerphq@gmail.com>
Date: 2023-03-25 (Sat, 25 Mar 2023)
Changed paths:
M dist/threads-shared/lib/threads/shared.pm
M dist/threads-shared/shared.xs
Log Message:
-----------
threads-shared - use pure prgagma version of CLANG_DIAG_IGNORE
Otherwise HPUX complains about unreachable statements.
"shared.xs", line 707: warning #2111-D: statement is unreachable
CLANG_DIAG_RESTORE_STMT;
^
This version should do the same thing, the only difference being
it doesnt allow a semicolon on the macro call.
Commit: 7363d2ba2be7e51c2f72be8fbf32b28ac9cc41ca
https://github.com/Perl/perl5/commit/7363d2ba2be7e51c2f72be8fbf32b28ac9cc41ca
Author: Yves Orton <demerphq@gmail.com>
Date: 2023-03-25 (Sat, 25 Mar 2023)
Changed paths:
M perl.h
Log Message:
-----------
perl.h - show HAS_LONG_DOUBLE as well as USE_LONG_DOUBLE
Make it easier to debug long double issues.
Compare: https://github.com/Perl/perl5/compare/d27f115fb570...7363d2ba2be7
-
[Perl/perl5] 494d51: perl.h - silence certain warnings on HPUXglobally.
by Yves Orton via perl5-changes