aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2015-09-07 09:11:17 +0000
committerMarek Polacek <mpolacek@gcc.gnu.org>2015-09-07 09:11:17 +0000
commit85bc8baac9a16ba74116be18b577b840fcaa499d (patch)
tree8d44bbfc74320d6a43c2da536d8329570f75a99a /gcc
parent06b15b9270dccf4bb52362be10663a3d9d65310f (diff)
downloadgcc-85bc8baac9a16ba74116be18b577b840fcaa499d.zip
gcc-85bc8baac9a16ba74116be18b577b840fcaa499d.tar.gz
gcc-85bc8baac9a16ba74116be18b577b840fcaa499d.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/system.h2
2 files changed, 5 insertions, 1 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 <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
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. */