Branch: refs/heads/yves/hpux_build_warning_suppression
  Home:   https://github.com/Perl/perl5
  Commit: a0b42a15183d5c023db7a8cead21145a00bcab7b
      
https://github.com/Perl/perl5/commit/a0b42a15183d5c023db7a8cead21145a00bcab7b
  Author: Yves Orton <demer...@gmail.com>
  Date:   2023-03-29 (Wed, 29 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: 7f8806aea6b68a7ff371ab73a99846a7e737cde4
      
https://github.com/Perl/perl5/commit/7f8806aea6b68a7ff371ab73a99846a7e737cde4
  Author: Yves Orton <demer...@gmail.com>
  Date:   2023-03-29 (Wed, 29 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: ca7b6a932ef96fee76d0ffcb781a1b392ea0fc79
      
https://github.com/Perl/perl5/commit/ca7b6a932ef96fee76d0ffcb781a1b392ea0fc79
  Author: Yves Orton <demer...@gmail.com>
  Date:   2023-03-29 (Wed, 29 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: 7395cfa51df1c8e96dc23a83e62d36ddefe4f08f
      
https://github.com/Perl/perl5/commit/7395cfa51df1c8e96dc23a83e62d36ddefe4f08f
  Author: Yves Orton <demer...@gmail.com>
  Date:   2023-03-29 (Wed, 29 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: 9b8363f14a2322d831a5208763598fb9f77c3b3e
      
https://github.com/Perl/perl5/commit/9b8363f14a2322d831a5208763598fb9f77c3b3e
  Author: Yves Orton <demer...@gmail.com>
  Date:   2023-03-29 (Wed, 29 Mar 2023)

  Changed paths:
    M op.c

  Log Message:
  -----------
  op.c - deal with not-reached statement warning

The return statement could never be reached as the while loop
is while(1) and there is no break statement inside of it. This
patch replaces the 'return arg;' with a NOT_REACHED; assertion,
just in case someone does add a break later on without thinking.


  Commit: 9a97e2daadfe9f194e7d35819cb8d4e85580e5f9
      
https://github.com/Perl/perl5/commit/9a97e2daadfe9f194e7d35819cb8d4e85580e5f9
  Author: Yves Orton <demer...@gmail.com>
  Date:   2023-03-29 (Wed, 29 Mar 2023)

  Changed paths:
    M pp_sys.c

  Log Message:
  -----------
  pp_sys.c - suppress warning about comparison to unsigned value


  Commit: ab2ab76139f2c72d70c577b98d72eec6a51f5b49
      
https://github.com/Perl/perl5/commit/ab2ab76139f2c72d70c577b98d72eec6a51f5b49
  Author: Yves Orton <demer...@gmail.com>
  Date:   2023-03-29 (Wed, 29 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: 132ac55ed5a1f6771e4fad9dd53df9819934ccfa
      
https://github.com/Perl/perl5/commit/132ac55ed5a1f6771e4fad9dd53df9819934ccfa
  Author: Yves Orton <demer...@gmail.com>
  Date:   2023-03-29 (Wed, 29 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: 1bbcca4d4aa0378c92fa47274e205349df318b16
      
https://github.com/Perl/perl5/commit/1bbcca4d4aa0378c92fa47274e205349df318b16
  Author: Yves Orton <demer...@gmail.com>
  Date:   2023-03-29 (Wed, 29 Mar 2023)

  Changed paths:
    M hv.c
    M perl.c
    M sv.c

  Log Message:
  -----------
  sv.c - don't cast SVTYPEMASK to svtype, use SvIS_FREED() instead.

svtype is an enum with 18 values. SVTYPEMASK is 31. A picky compiler
(like on HPUX) will complain that casting 31 to a svtype is an error.

We have SvIS_FREED() to do this properly anyway.


  Commit: 0164e7f00a37622b9dd75270b71d6e875405c7f1
      
https://github.com/Perl/perl5/commit/0164e7f00a37622b9dd75270b71d6e875405c7f1
  Author: Yves Orton <demer...@gmail.com>
  Date:   2023-03-29 (Wed, 29 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: fbaccd978d31a787618cfe6b6617961d4e9b9921
      
https://github.com/Perl/perl5/commit/fbaccd978d31a787618cfe6b6617961d4e9b9921
  Author: Yves Orton <demer...@gmail.com>
  Date:   2023-03-29 (Wed, 29 Mar 2023)

  Changed paths:
    M t/op/sprintf2.t

  Log Message:
  -----------
  t/op/sprintf2 - TODO some failing tests for %g.

On HPUX none of the usual methods for doing high precision %g seem to
work:

    Checking for an efficient way to convert floats to strings.
    Trying sprintf...
    sprintf() found.
    sprintf length mismatch:  Expected 55, got 38
    ...But sprintf didn't work as I expected.
    Trying gconvert...
    gconvert NOT found.
    Trying gcvt...
    gcvt() found.
    gcvt length mismatch:  Expected 55, got 38
    ...But gcvt didn't work as I expected.
    *** WHOA THERE!!! ***
    None of ( sprintf gconvert gcvt)  seemed to work properly.  I'll use 
sprintf.

So we can safely TODO these tests for now.

See: https://github.com/Perl/perl5/issues/20953#issuecomment-1478744988
and: https://github.com/Perl/perl5/issues/20953#issuecomment-1483814118

Fixes: #20953
And also some issues in: #20959


  Commit: 8b334ec4b722413df0ddec2162b672f50c75adcb
      
https://github.com/Perl/perl5/commit/8b334ec4b722413df0ddec2162b672f50c75adcb
  Author: Yves Orton <demer...@gmail.com>
  Date:   2023-03-29 (Wed, 29 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: b7bd6ba0aff9ea367048d37c239bb9017113f396
      
https://github.com/Perl/perl5/commit/b7bd6ba0aff9ea367048d37c239bb9017113f396
  Author: Yves Orton <demer...@gmail.com>
  Date:   2023-03-29 (Wed, 29 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: 07a5038e36129a24863b32a0cf4cd32285a5c0ec
      
https://github.com/Perl/perl5/commit/07a5038e36129a24863b32a0cf4cd32285a5c0ec
  Author: Yves Orton <demer...@gmail.com>
  Date:   2023-03-29 (Wed, 29 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: bb09c1424f512ab3478bbbf95959fbec45ea2a1f
      
https://github.com/Perl/perl5/commit/bb09c1424f512ab3478bbbf95959fbec45ea2a1f
  Author: Yves Orton <demer...@gmail.com>
  Date:   2023-03-29 (Wed, 29 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: 18d278760aa986692ba95f3af9030ddfeb6802e6
      
https://github.com/Perl/perl5/commit/18d278760aa986692ba95f3af9030ddfeb6802e6
  Author: Yves Orton <demer...@gmail.com>
  Date:   2023-03-29 (Wed, 29 Mar 2023)

  Changed paths:
    M perlio.c

  Log Message:
  -----------
  perlio.c - double cast PerlIO_lockcnt()

This avoids various warnings about alignment on HPUX.


  Commit: 68300910018582a4a22f2a5a513429a697e81392
      
https://github.com/Perl/perl5/commit/68300910018582a4a22f2a5a513429a697e81392
  Author: Yves Orton <demer...@gmail.com>
  Date:   2023-03-29 (Wed, 29 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: c40d9048de2d5d1dcac6d64703d59780989767fb
      
https://github.com/Perl/perl5/commit/c40d9048de2d5d1dcac6d64703d59780989767fb
  Author: Yves Orton <demer...@gmail.com>
  Date:   2023-03-29 (Wed, 29 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: e7d3a7722d03614395df4cf71ca2d1dbc27a1004
      
https://github.com/Perl/perl5/commit/e7d3a7722d03614395df4cf71ca2d1dbc27a1004
  Author: Yves Orton <demer...@gmail.com>
  Date:   2023-03-29 (Wed, 29 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: 2959d6d15a56f8e773892093fb79f92999ca569b
      
https://github.com/Perl/perl5/commit/2959d6d15a56f8e773892093fb79f92999ca569b
  Author: Yves Orton <demer...@gmail.com>
  Date:   2023-03-29 (Wed, 29 Mar 2023)

  Changed paths:
    M intrpvar.h

  Log Message:
  -----------
  intrpvar - ignore deprecated warning on MSVC as well


  Commit: 68d869c2aa214a006249c8cfdf817fbe013dc1ae
      
https://github.com/Perl/perl5/commit/68d869c2aa214a006249c8cfdf817fbe013dc1ae
  Author: Yves Orton <demer...@gmail.com>
  Date:   2023-03-29 (Wed, 29 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: 5e9010f3753b8c4dbe9c4058d374dc933316f31b
      
https://github.com/Perl/perl5/commit/5e9010f3753b8c4dbe9c4058d374dc933316f31b
  Author: Yves Orton <demer...@gmail.com>
  Date:   2023-03-29 (Wed, 29 Mar 2023)

  Changed paths:
    M dist/threads-shared/lib/threads/shared.pm
    M dist/threads-shared/shared.xs

  Log Message:
  -----------
  threads-shared - use pure pragma 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: 721fbc3c5b0e8e0a916ce604d4c847745fb0a75d
      
https://github.com/Perl/perl5/commit/721fbc3c5b0e8e0a916ce604d4c847745fb0a75d
  Author: Yves Orton <demer...@gmail.com>
  Date:   2023-03-29 (Wed, 29 Mar 2023)

  Changed paths:
    M perl.c

  Log Message:
  -----------
  perl.c - show HAS_LONG_DOUBLE and HAS_STRTOLD as well as USE_LONG_DOUBLE

Makes it easier to debug long double issues.


  Commit: 49ced3cb8825d82ab78e867870ea3f486979bc15
      
https://github.com/Perl/perl5/commit/49ced3cb8825d82ab78e867870ea3f486979bc15
  Author: Yves Orton <demer...@gmail.com>
  Date:   2023-03-29 (Wed, 29 Mar 2023)

  Changed paths:
    M hints/hpux.sh

  Log Message:
  -----------
  hints/hpux - only run d_strtold define override check on version < 11.23

I added a version check around the logic as the comment already says
that "In HP-UXes prior to 11.23 strtold() returned a HP-UX specific
union called long_double, not a C99 long double."

The logic did not check for the version mentioned in the comment, it
simply greped for something that is no longer present in the file:

    grep 'double strtold.const' /usr/include/stdlib.h

outputs nothing on HPUX version B.11.31.

But

    grep "double strtold" /usr/include/stdlib.h

outputs:

    extern long_double strtold __((const char * __restrict, char ** 
__restrict));
    extern long double strtold __((const char * __restrict, char ** 
__restrict));

on HPUX version B.11.31.


  Commit: f1892df1ab9897544810cf679fc72207a0c29c90
      
https://github.com/Perl/perl5/commit/f1892df1ab9897544810cf679fc72207a0c29c90
  Author: Yves Orton <demer...@gmail.com>
  Date:   2023-03-29 (Wed, 29 Mar 2023)

  Changed paths:
    M t/porting/globvar.t

  Log Message:
  -----------
  t/porting/globvar.t - fix for HPUX

On HPUX `nm globals.o` produces output like this (without the indent):

    [5]    |                  2420|       2|OBJT |GLOB |0| .rodata|PL_Yes

So change the $define qr// to accommodate it.

We also have to TODO some of the tests, as HPUX seems to export
everything.


  Commit: 2f9a6df40bf673ef3c0c88f7ae5d6945cbf91ce9
      
https://github.com/Perl/perl5/commit/2f9a6df40bf673ef3c0c88f7ae5d6945cbf91ce9
  Author: Yves Orton <demer...@gmail.com>
  Date:   2023-03-29 (Wed, 29 Mar 2023)

  Changed paths:
    M Porting/Maintainers.pl
    M t/porting/customized.dat

  Log Message:
  -----------
  Porting/maintainers.pl - remove Net-Ping customized files

Net-Ping is in dist/ which means we are upstream, so there should
not be any customized files.


  Commit: 8265c392244f6200455404e4ef47ab322a8d0ec3
      
https://github.com/Perl/perl5/commit/8265c392244f6200455404e4ef47ab322a8d0ec3
  Author: Yves Orton <demer...@gmail.com>
  Date:   2023-03-29 (Wed, 29 Mar 2023)

  Changed paths:
    M dist/Net-Ping/lib/Net/Ping.pm
    M dist/Net-Ping/t/450_service.t

  Log Message:
  -----------
  dist/Net-Ping - remove HPUX from the exclusions list in 450_service.t

We pass these tests just fine on HPUX 11.31.


Compare: https://github.com/Perl/perl5/compare/c73e36f4d3bd...8265c392244f

Reply via email to