From 8df4088db74e1f8097d26d2c87f4929c3c50bd22 Mon Sep 17 00:00:00 2001 From: mpolacek Date: Mon, 7 Sep 2015 09:11:17 +0000 Subject: [PATCH] * system.h (INTTYPE_MINIMUM): Rewrite to avoid shift warning. * system.h (INTTYPE_MINIMUM): Rewrite to avoid shift warning. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@227516 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 4 ++++ gcc/system.h | 2 +- libcpp/ChangeLog | 4 ++++ libcpp/system.h | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9e59992..e64180a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2015-09-07 Marek Polacek + + * system.h (INTTYPE_MINIMUM): Rewrite to avoid shift warning. + 2015-09-04 Paolo Bonzini * config/i386/cygming.h (SUBTARGET_OVERRIDE_OPTIONS): Do diff --git a/gcc/system.h b/gcc/system.h index 9ca5b5f..78ad609 100644 --- a/gcc/system.h +++ b/gcc/system.h @@ -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. */ diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index 28ce2d8..3173bf5 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -1,3 +1,7 @@ +2015-09-07 Marek Polacek + + * system.h (INTTYPE_MINIMUM): Rewrite to avoid shift warning. + 2015-08-06 Yaakov Selkowitz * configure: Regenerate. diff --git a/libcpp/system.h b/libcpp/system.h index b18d658..a2e8c26 100644 --- a/libcpp/system.h +++ b/libcpp/system.h @@ -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. */ -- 2.7.4