In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/0d55a45a6f024919f13cbe70fc861f5eb6d757ee?hp=7eb19200f4ef00b9a61884cbb755b9621b9c701d>

- Log -----------------------------------------------------------------
commit 0d55a45a6f024919f13cbe70fc861f5eb6d757ee
Author: Jarkko Hietaniemi <[email protected]>
Date:   Thu Nov 20 20:13:34 2014 -0500

    Drop -std=c89.
    
    (1) It doesn't mean "strict C89" on its own, -pedantic would also be needed.
    (2) Using C99 features like long long or inline becomes harder.
    
    The downside of this change is that C99-isms can more easily
    creep into the core code, breaking it for non-gcc C89 compilers.

M       cflags.SH

commit ec7c51d01dced96cba496c6393c9a4546d1e306c
Author: Jarkko Hietaniemi <[email protected]>
Date:   Wed Nov 19 21:40:55 2014 -0500

    tgamma infinity limit for IEEE quad prec.

M       ext/POSIX/POSIX.xs
-----------------------------------------------------------------------

Summary of changes:
 cflags.SH          | 10 ++++++++--
 ext/POSIX/POSIX.xs |  8 +++++++-
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/cflags.SH b/cflags.SH
index bdb4bad..6c3e812 100755
--- a/cflags.SH
+++ b/cflags.SH
@@ -167,13 +167,19 @@ case "$gccversion" in
 [12]*) ;; # gcc versions 1 (gasp!) and 2 are not good for this.
 Intel*) ;; # # Is that you, Intel C++?
 #
-# NOTE 1: the -std=c89 without -pedantic is a bit pointless.
+# NOTE 1: the -std=c89 without -pedantic is a bit pointless,
+# so we will not add it here.  You will have to use e.g.
+# Configure -Accflags=-std=c89
+#
 # Just -std=c89 means "if there is room for interpretation,
 # interpret the C89 way."  It does NOT mean "strict C89" on its own.
 # You need to add the -pedantic for that.  To do this with Configure,
 # do -Dgccansipedantic (note that the -ansi is included in any case,
 # the option is a bit oddly named, for historical reasons.)
 #
+# Furthermore, -std=c89 disables/hides/makes harder to use certain
+# non-C89 features like long long.
+#
 # NOTE 2: -pedantic necessitates adding a couple of flags:
 # * -PERL_GCC_PEDANTIC so that the perl code can adapt: there's nothing
 #   added by gcc itself to indicate pedanticness.
@@ -184,7 +190,7 @@ Intel*) ;; # # Is that you, Intel C++?
 # NOTE 3: the relative order of these options matters:
 # -Wextra before -W, and -pedantic* before -Werror=d-a-s.
 #
-*)  for opt in -ansi -std=c89 $pedantic \
+*)  for opt in -ansi $pedantic \
                -Werror=declaration-after-statement \
                -Wextra -W \
                -Wc++-compat -Wwrite-strings
diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs
index 1485d3d..9d41bf0 100644
--- a/ext/POSIX/POSIX.xs
+++ b/ext/POSIX/POSIX.xs
@@ -829,9 +829,15 @@ static NV my_tgamma(NV x)
   }
 
   /* Third interval: [12, +Inf) */
-  if (x > 171.624) { /* XXX Too low for quad precision */
+#if LDBL_MANT_DIG == 113 /* IEEE quad prec */
+  if (x > 1755.548) {
     return NV_INF;
   }
+#else
+  if (x > 171.624) {
+    return NV_INF;
+  }
+#endif
 
   return Perl_exp(c99_lgamma(x));
 }

--
Perl5 Master Repository

Reply via email to