Commit c276d605 by Uros Bizjak Committed by Uros Bizjak

re PR libfortran/66650 (libgfortran: warning: left shift of negative value…

re PR libfortran/66650 (libgfortran: warning: left shift of negative value [-Wshift-negative-value])

	PR libgfortran/66650
	* libgfortran.h (GFC_DTYPE_SIZE_MASK): Rewrite to avoid
	"left shift of negative value" warning.

From-SVN: r226355
parent 626b8d8a
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-14 Janne Blomqvist <jb@gcc.gnu.org> 2015-07-14 Janne Blomqvist <jb@gcc.gnu.org>
PR libfortran/66861 PR libfortran/66861
......
...@@ -404,8 +404,7 @@ typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_LOGICAL_16) gfc_array_l16; ...@@ -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 */ /* Macros to get both the size and the type with a single masking operation */
#define GFC_DTYPE_SIZE_MASK \ #define GFC_DTYPE_SIZE_MASK (-((index_type) 1 << GFC_DTYPE_SIZE_SHIFT))
((~((index_type) 0) >> GFC_DTYPE_SIZE_SHIFT) << GFC_DTYPE_SIZE_SHIFT)
#define GFC_DTYPE_TYPE_SIZE_MASK (GFC_DTYPE_SIZE_MASK | GFC_DTYPE_TYPE_MASK) #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) #define GFC_DTYPE_TYPE_SIZE(desc) ((desc)->dtype & GFC_DTYPE_TYPE_SIZE_MASK)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment