summaryrefslogtreecommitdiff
path: root/math/tgmath.h
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2008-11-12 20:29:35 +0000
committerJakub Jelinek <jakub@redhat.com>2008-11-12 20:29:35 +0000
commit03c8e287448a12c8c4c6db3570f5b7e3930d488d (patch)
tree6227d4a8b3362cade23f1a5bdf6065c4e4a415ec /math/tgmath.h
parentc02fa54041a68c12107ec577770ff81329af3bef (diff)
Updated to fedora-glibc-20081112T2008cvs/fedora-glibc-2_8_90-17
Diffstat (limited to 'math/tgmath.h')
-rw-r--r--math/tgmath.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/math/tgmath.h b/math/tgmath.h
index 4f45aaa0f2..eefdd26c9c 100644
--- a/math/tgmath.h
+++ b/math/tgmath.h
@@ -48,7 +48,14 @@
/* 1 if 'type' is a floating type, 0 if 'type' is an integer type.
Allows for _Bool. Expands to an integer constant expression. */
-# define __floating_type(type) (((type) 0.25) && ((type) 0.25 - 1))
+# if __GNUC_PREREQ (3, 1)
+# define __floating_type(type) \
+ (__builtin_classify_type ((type) 0) == 8 \
+ || (__builtin_classify_type ((type) 0) == 9 \
+ && __builtin_classify_type (__real__ ((type) 0)) == 8))
+# else
+# define __floating_type(type) (((type) 0.25) && ((type) 0.25 - 1))
+# endif
/* The tgmath real type for T, where E is 0 if T is an integer type and
1 for a floating type. */