system.h (INTTYPE_MINIMUM): Rewrite to avoid shift warning.

* system.h (INTTYPE_MINIMUM): Rewrite to avoid shift warning.

	* system.h (INTTYPE_MINIMUM): Rewrite to avoid shift warning.

From-SVN: r227516
This commit is contained in:
Marek Polacek 2015-09-07 09:11:17 +00:00 committed by Marek Polacek
parent 06b15b9270
commit 85bc8baac9
4 changed files with 10 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2015-09-07 Marek Polacek <polacek@redhat.com>
* system.h (INTTYPE_MINIMUM): Rewrite to avoid shift warning.
2015-09-04 Paolo Bonzini <bonzini@gnu.org>
* config/i386/cygming.h (SUBTARGET_OVERRIDE_OPTIONS): Do

View File

@ -307,7 +307,7 @@ extern int errno;
/* The outer cast is needed to work around a bug in Cray C 5.0.3.0.
It is necessary at least when t == time_t. */
#define INTTYPE_MINIMUM(t) ((t) (INTTYPE_SIGNED (t) \
? ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1) : (t) 0))
? (t) 1 << (sizeof (t) * CHAR_BIT - 1) : (t) 0))
#define INTTYPE_MAXIMUM(t) ((t) (~ (t) 0 - INTTYPE_MINIMUM (t)))
/* Use that infrastructure to provide a few constants. */

View File

@ -1,3 +1,7 @@
2015-09-07 Marek Polacek <polacek@redhat.com>
* system.h (INTTYPE_MINIMUM): Rewrite to avoid shift warning.
2015-08-06 Yaakov Selkowitz <yselkowi@redhat.com>
* configure: Regenerate.

View File

@ -230,7 +230,7 @@ extern int errno;
/* The outer cast is needed to work around a bug in Cray C 5.0.3.0.
It is necessary at least when t == time_t. */
#define INTTYPE_MINIMUM(t) ((t) (INTTYPE_SIGNED (t) \
? ~ (t) 0 << (sizeof(t) * CHAR_BIT - 1) : (t) 0))
? (t) 1 << (sizeof (t) * CHAR_BIT - 1) : (t) 0))
#define INTTYPE_MAXIMUM(t) ((t) (~ (t) 0 - INTTYPE_MINIMUM (t)))
/* Use that infrastructure to provide a few constants. */