summaryrefslogtreecommitdiff
path: root/gmp-h.in
diff options
context:
space:
mode:
authorMarc Glisse <marc.glisse@inria.fr>2014-01-02 13:25:31 +0100
committerMarc Glisse <marc.glisse@inria.fr>2014-01-02 13:25:31 +0100
commit5e05d1f7516879559f504bf267cd84235ff24655 (patch)
treeb5cdbcd800bff6ac476941e304fff2e8e1e916a7 /gmp-h.in
parentb892dcad77d5d15b5f79e764802d33206efbc710 (diff)
downloadgmp-5e05d1f7516879559f504bf267cd84235ff24655.tar.gz
SHRT_MAX etc have the promoted type in standard C.
Diffstat (limited to 'gmp-h.in')
-rw-r--r--gmp-h.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/gmp-h.in b/gmp-h.in
index 670eeb44f..45ba02edb 100644
--- a/gmp-h.in
+++ b/gmp-h.in
@@ -437,10 +437,10 @@ typedef __mpq_struct *mpq_ptr;
#define __GMP_MAX(h,i) ((h) > (i) ? (h) : (i))
/* __GMP_USHRT_MAX is not "~ (unsigned short) 0" because short is promoted
- to int by "~". */
+ to int by "~". It still needs to have the promoted type. */
#define __GMP_UINT_MAX (~ (unsigned) 0)
#define __GMP_ULONG_MAX (~ (unsigned long) 0)
-#define __GMP_USHRT_MAX ((unsigned short) ~0)
+#define __GMP_USHRT_MAX (0 + (unsigned short) ~0)
/* __builtin_expect is in gcc 3.0, and not in 2.95. */