public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Preserve ::is{inf,nan}{f,l} prototypes even for C++11 and later
@ 2016-02-01 16:22 Jakub Jelinek
  2016-02-01 16:34 ` Jonathan Wakely
  0 siblings, 1 reply; 17+ messages in thread
From: Jakub Jelinek @ 2016-02-01 16:22 UTC (permalink / raw)
  To: Adhemerval Zanella; +Cc: libc-alpha, Jonathan Wakely

The recent changes disable not just ::is{inf,nan} prototypes that are
incompatible with C++11 and later and that are defined in <cmath> or
libstdc++ <math.h> wrapper, but also the ::is{inf,nan}{f,l} prototypes,
that are not incompatible with C++11.  This patch adds them back.

---
 math/bits/mathcalls.h | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/math/bits/mathcalls.h b/math/bits/mathcalls.h
index a48345d..1b82fcd 100644
--- a/math/bits/mathcalls.h
+++ b/math/bits/mathcalls.h
@@ -196,7 +196,9 @@ __MATHDECL_1 (int,__finite,, (_Mdouble_ __value)) __attribute__ ((__const__));
 _Mdouble_END_NAMESPACE
 
 #ifdef __USE_MISC
-# if !defined __cplusplus || __cplusplus < 201103L /* Conflicts with C++11.  */
+# if (!defined __cplusplus \
+      || __cplusplus < 201103L /* isinf conflicts with C++11.  */ \
+      || __MATH_DECLARING_DOUBLE == 0) /* isinff or isinfl don't.  */
 /* Return 0 if VALUE is finite or NaN, +1 if it
    is +Infinity, -1 if it is -Infinity.  */
 __MATHDECL_1 (int,isinf,, (_Mdouble_ __value)) __attribute__ ((__const__));
@@ -232,7 +234,9 @@ __END_NAMESPACE_C99
 __MATHDECL_1 (int,__isnan,, (_Mdouble_ __value)) __attribute__ ((__const__));
 
 #if defined __USE_MISC || (defined __USE_XOPEN && !defined __USE_XOPEN2K)
-# if !defined __cplusplus || __cplusplus < 201103L /* Conflicts with C++11.  */
+# if (!defined __cplusplus \
+      || __cplusplus < 201103L /* isinf conflicts with C++11.  */ \
+      || __MATH_DECLARING_DOUBLE == 0) /* isinff or isinfl don't.  */
 /* Return nonzero if VALUE is not a number.  */
 __MATHDECL_1 (int,isnan,, (_Mdouble_ __value)) __attribute__ ((__const__));
 # endif
-- 
2.4.3

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2016-02-24  8:59 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-01 16:22 [PATCH] Preserve ::is{inf,nan}{f,l} prototypes even for C++11 and later Jakub Jelinek
2016-02-01 16:34 ` Jonathan Wakely
2016-02-03 16:56   ` Adhemerval Zanella
2016-02-03 17:15     ` Jonathan Wakely
2016-02-03 17:29       ` Jakub Jelinek
2016-02-03 17:40     ` Mike Frysinger
2016-02-03 18:04       ` Adhemerval Zanella
2016-02-09 17:24         ` Jonathan Wakely
2016-02-09 17:38           ` Carlos O'Donell
2016-02-09 21:54             ` Carlos O'Donell
2016-02-10 16:30               ` Adhemerval Zanella
2016-02-15  1:20                 ` Carlos O'Donell
2016-02-23 15:32               ` Andreas Schwab
2016-02-23 15:41                 ` Jakub Jelinek
2016-02-23 17:41                 ` Carlos O'Donell
2016-02-24  8:59                   ` Andreas Schwab
2016-02-24  9:39                     ` Carlos O'Donell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).