diff options
author | vmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-06-26 16:56:06 +0000 |
---|---|---|
committer | vmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-06-26 16:56:06 +0000 |
commit | 582a8503d6e7857151edc0ec5b4373294e092130 (patch) | |
tree | 53304a0397f97997dcccc23ae35f5dd8fffc914f /gcc/glimits.h | |
parent | ea72f3cb93f34c8588e586cd987f01faa244d86d (diff) | |
download | gcc-582a8503d6e7857151edc0ec5b4373294e092130.tar.gz |
2001-06-26 Vladimir Makarov <vmakarov@toke.toronto.redhat.com>
* glimits.h (USHRT_MAX): Use unsigned suffix if int can not hold
it.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@43584 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/glimits.h')
-rw-r--r-- | gcc/glimits.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gcc/glimits.h b/gcc/glimits.h index 979e7155803..f0cb0a3bba4 100644 --- a/gcc/glimits.h +++ b/gcc/glimits.h @@ -44,10 +44,6 @@ #undef SHRT_MAX #define SHRT_MAX 32767 -/* Maximum value an `unsigned short int' can hold. (Minimum is 0). */ -#undef USHRT_MAX -#define USHRT_MAX 65535 - /* Minimum and maximum values a `signed int' can hold. */ #ifndef __INT_MAX__ #define __INT_MAX__ 2147483647 @@ -57,6 +53,14 @@ #undef INT_MAX #define INT_MAX __INT_MAX__ +/* Maximum value an `unsigned short int' can hold. (Minimum is 0). */ +#undef USHRT_MAX +#if INT_MAX < 65535 +#define USHRT_MAX 65535U +#else +#define USHRT_MAX 65535 +#endif + /* Maximum value an `unsigned int' can hold. (Minimum is 0). */ #undef UINT_MAX #define UINT_MAX (INT_MAX * 2U + 1) |