summaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2015-07-29 17:12:28 +0000
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2015-07-29 17:12:28 +0000
commitddf8f27a96c5e23d892fa84d64bedabcacb21f94 (patch)
tree4e86cd6890d6991d1e9f51123e625c618215f8a4 /libgfortran
parentee512834daecb7e643e05ffe14e92e8f562ff17e (diff)
downloadgcc-ddf8f27a96c5e23d892fa84d64bedabcacb21f94.tar.gz
PR libgfortran/66650
* libgfortran.h (GFC_DTYPE_SIZE_MASK): Rewrite to avoid "left shift of negative value" warning. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-5-branch@226357 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran')
-rw-r--r--libgfortran/ChangeLog6
-rw-r--r--libgfortran/libgfortran.h3
2 files changed, 7 insertions, 2 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 1b6944a9603..dd971563d79 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,9 @@
+2015-07-29 Uros Bizjak <ubizjak@gmail.com>
+
+ PR libgfortran/66650
+ * libgfortran.h (GFC_DTYPE_SIZE_MASK): Rewrite to avoid
+ "left shift of negative value" warning.
+
2015-07-16 Release Manager
* GCC 5.2.0 released.
diff --git a/libgfortran/libgfortran.h b/libgfortran/libgfortran.h
index 8962154aae7..39e5e4ae642 100644
--- a/libgfortran/libgfortran.h
+++ b/libgfortran/libgfortran.h
@@ -404,8 +404,7 @@ typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_LOGICAL_16) gfc_array_l16;
/* Macros to get both the size and the type with a single masking operation */
-#define GFC_DTYPE_SIZE_MASK \
- ((~((index_type) 0) >> GFC_DTYPE_SIZE_SHIFT) << GFC_DTYPE_SIZE_SHIFT)
+#define GFC_DTYPE_SIZE_MASK (-((index_type) 1 << GFC_DTYPE_SIZE_SHIFT))
#define GFC_DTYPE_TYPE_SIZE_MASK (GFC_DTYPE_SIZE_MASK | GFC_DTYPE_TYPE_MASK)
#define GFC_DTYPE_TYPE_SIZE(desc) ((desc)->dtype & GFC_DTYPE_TYPE_SIZE_MASK)