diff options
author | joseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2008-11-11 15:56:28 +0000 |
---|---|---|
committer | joseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2008-11-11 15:56:28 +0000 |
commit | 6425079fe4adfd8e5ee0105b0b434925e329e512 (patch) | |
tree | 41ca4388b27edf6aa8fd8c64226ec88cbd3eb33d /libc/math | |
parent | fab640f0bdf4e32f752e93859718a2a302406ac3 (diff) | |
download | eglibc2-6425079fe4adfd8e5ee0105b0b434925e329e512.tar.gz |
Merge changes between r7165 and r7310 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@7311 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/math')
-rw-r--r-- | libc/math/tgmath.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libc/math/tgmath.h b/libc/math/tgmath.h index 4f45aaa0f..eefdd26c9 100644 --- a/libc/math/tgmath.h +++ b/libc/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. */ |