Branch: refs/heads/smoke-me/tonyc/22211-gcc-posix-build-issues
  Home:   https://github.com/Perl/perl5
  Commit: 3ede54cc250ec70c356e22bad1996cc7fea6acdc
      
https://github.com/Perl/perl5/commit/3ede54cc250ec70c356e22bad1996cc7fea6acdc
  Author: Tony Cook <t...@develop-help.com>
  Date:   2024-05-27 (Mon, 27 May 2024)

  Changed paths:
    M ext/POSIX/POSIX.xs

  Log Message:
  -----------
  POSIX: win32 calls "putenv" "_putenv"

This produced build errors with gcc 14.


  Commit: 0d3f242d1acc84f375f2cd74d20ea5bb60d2bb16
      
https://github.com/Perl/perl5/commit/0d3f242d1acc84f375f2cd74d20ea5bb60d2bb16
  Author: Tony Cook <t...@develop-help.com>
  Date:   2024-05-27 (Mon, 27 May 2024)

  Changed paths:
    M pod/perlguts.pod

  Log Message:
  -----------
  perlguts: PTR2ul() is unsafe

For a 64-bit build on Windows, pointers are 64-bits, while
long is 32-bits, so PTR2ul() discards some bits.


  Commit: c3c9c12d6a4e2db8c49aa8c0a53ac65fcfe1c89d
      
https://github.com/Perl/perl5/commit/c3c9c12d6a4e2db8c49aa8c0a53ac65fcfe1c89d
  Author: Tony Cook <t...@develop-help.com>
  Date:   2024-05-27 (Mon, 27 May 2024)

  Changed paths:
    M perl.h

  Log Message:
  -----------
  isnan (long double): always use the C99 version

C99 requires that isnan() is a generic macro that accepts the
standard floating point types (float, double, long double).

We always include math.h eventually, so this macro should be
available.

This is complicated by C++.  C++98 depends on C89, which does
not require isnan(), but since we do require C99, I think we
need to require a minimum of C++11, which follows C99.

C++11 does *not* define isnan() as a macro, but as a set of
overloaded functions, which produces almost the same result,
the difference being that the macro test that was done by this
code is no longer valid.

The old code would fail to build with long double builds C++
builds with gcc on Window:

..\sv.c: In function 'size_t S_infnan_2pv(NV, char*, size_t, char)':
..\perl.h:2680:34: error: 'isnanl' was not declared in this scope; did you mean 
'isnan'?
 2680 | #           define Perl_isnan(x) isnanl(x)
      |                                  ^~~~~~
..\sv.c:2882:14: note: in expansion of macro 'Perl_isnan'
 2882 |     else if (Perl_isnan(nv)) {
      |              ^~~~~~~~~~
..\sv.c: In function 'U8* S_hextract(NV, int*, bool*, U8*, U8*)':
..\perl.h:2680:34: error: 'isnanl' was not declared in this scope; did you mean 
'isnan'?
 2680 | #           define Perl_isnan(x) isnanl(x)
      |                                  ^~~~~~
..\perl.h:8605:69: note: in expansion of macro 'Perl_isnan'
 8605 | #  define Perl_fp_class_denorm(x) ((x) != 0.0 && !Perl_isinf(x) && 
!Perl_isnan(x) && PERL_ABS(x) < NV_MIN)
      |                                                                     
^~~~~~~~~~
..\sv.c:11604:49: note: in expansion of macro 'Perl_fp_class_denorm'
11604 | #define HEXTRACT_GET_SUBNORMAL(nv) *subnormal = Perl_fp_class_denorm(nv)
      |                                                 ^~~~~~~~~~~~~~~~~~~~
..\sv.c:11672:9: note: in expansion of macro 'HEXTRACT_GET_SUBNORMAL'
11672 |         HEXTRACT_GET_SUBNORMAL(nv);
      |         ^~~~~~~~~~~~~~~~~~~~~~

and with gcc 14.2, which requires prototypes per C99:

In file included from ..\sv.c:32:
..\sv.c: In function 'S_infnan_2pv':
..\perl.h:2680:34: error: implicit declaration of function 'isnanl'; did you 
mean 'isnan'? [-Wimplicit-function-declaration]
 2680 | #           define Perl_isnan(x) isnanl(x)
      |                                  ^~~~~~
..\sv.c:2882:14: note: in expansion of macro 'Perl_isnan'
 2882 |     else if (Perl_isnan(nv)) {
      |              ^~~~~~~~~~
gmake: *** [GNUmakefile:1430: mini\sv.o] Error 1


  Commit: 193399ae1fc80bfd1b914374e87c0728a0f02c50
      
https://github.com/Perl/perl5/commit/193399ae1fc80bfd1b914374e87c0728a0f02c50
  Author: Tony Cook <t...@develop-help.com>
  Date:   2024-05-27 (Mon, 27 May 2024)

  Changed paths:
    M ext/POSIX/POSIX.xs

  Log Message:
  -----------
  POSIX: mingw64 doesn't make the bessel functions visible with -std=c99

And doesn't provide a way to make them visible, even though they
are visible by default for MSVC UCRT builds.

The __MINGW32__ macro is set for both 32-bit and 64-bit MINGW builds.


  Commit: 9e68950a61cf61dc5bf2f3eeb7369b532e1ab600
      
https://github.com/Perl/perl5/commit/9e68950a61cf61dc5bf2f3eeb7369b532e1ab600
  Author: Tony Cook <t...@develop-help.com>
  Date:   2024-05-27 (Mon, 27 May 2024)

  Changed paths:
    M win32/config.gc
    M win32/config.vc
    M win32/config_H.gc
    M win32/config_H.vc

  Log Message:
  -----------
  win32/config*: all the supported compilers have isfinite()


  Commit: 4991f5a24486ff562184953e11728ca073bc6cc3
      
https://github.com/Perl/perl5/commit/4991f5a24486ff562184953e11728ca073bc6cc3
  Author: Tony Cook <t...@develop-help.com>
  Date:   2024-05-27 (Mon, 27 May 2024)

  Changed paths:
    M ext/POSIX/t/math.t

  Log Message:
  -----------
  POSIX: add simple bessel function tests


Compare: https://github.com/Perl/perl5/compare/3ede54cc250e%5E...4991f5a24486

To unsubscribe from these emails, change your notification settings at 
https://github.com/Perl/perl5/settings/notifications

Reply via email to