This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[gomp4] GOMP_DIM_MASK tweak


I've installed this to make GOMP_DIM_MASK return an unsigned type -- I tripped over some signed/unsigned compare warnings.

nathan
2015-08-21  Nathan Sidwell  <nathan@codesourcery.com>

	* gomp-constants.h (GOMP_DIM_MASK): Generate unsigned.

Index: gomp-constants.h
===================================================================
--- gomp-constants.h	(revision 227079)
+++ gomp-constants.h	(working copy)
@@ -126,7 +126,7 @@ enum gomp_map_kind
 #define GOMP_DIM_WORKER	1
 #define GOMP_DIM_VECTOR	2
 #define GOMP_DIM_MAX	3
-#define GOMP_DIM_MASK(X) (1 << (X))
+#define GOMP_DIM_MASK(X) (1u << (X))
 
 /* Varadic launch arguments.  */
 #define GOMP_LAUNCH_END 	0  /* End of args, no dev or op */

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]