This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
The #ifdef NV_MIN_EXP straddled the if () braces.
authorAndy Broad <andy@broad.ology.org.uk>
Wed, 26 Aug 2015 00:04:01 +0000 (20:04 -0400)
committerJarkko Hietaniemi <jhi@iki.fi>
Thu, 27 Aug 2015 12:09:47 +0000 (08:09 -0400)
Though non-straddling, make the NV_MAX_EXP case identical.

toke.c

diff --git a/toke.c b/toke.c
index 9e332fc..0cbe1c0 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -10347,24 +10347,20 @@ Perl_scan_num(pTHX_ const char *start, YYSTYPE* lvalp)
                                 hexfp_exp += *h - '0';
 #ifdef NV_MIN_EXP
                                 if (negexp
                                 hexfp_exp += *h - '0';
 #ifdef NV_MIN_EXP
                                 if (negexp
-                                    && -hexfp_exp < NV_MIN_EXP - 1)
-                                {
+                                    && -hexfp_exp < NV_MIN_EXP - 1) {
                                     Perl_ck_warner(aTHX_ packWARN(WARN_OVERFLOW),
                                                    "Hexadecimal float: exponent underflow");
                                     Perl_ck_warner(aTHX_ packWARN(WARN_OVERFLOW),
                                                    "Hexadecimal float: exponent underflow");
-#endif
                                     break;
                                 }
                                     break;
                                 }
-                                else {
+#endif
 #ifdef NV_MAX_EXP
 #ifdef NV_MAX_EXP
-                                    if (!negexp
-                                        && hexfp_exp > NV_MAX_EXP - 1)
-                                    {
-                                        Perl_ck_warner(aTHX_ packWARN(WARN_OVERFLOW),
+                                if (!negexp
+                                    && hexfp_exp > NV_MAX_EXP - 1) {
+                                    Perl_ck_warner(aTHX_ packWARN(WARN_OVERFLOW),
                                                    "Hexadecimal float: exponent overflow");
                                                    "Hexadecimal float: exponent overflow");
-                                        break;
-                                    }
-#endif
+                                    break;
                                 }
                                 }
+#endif
                             }
                             h++;
                         }
                             }
                             h++;
                         }