[libclc] 08/58: integer: remove explicit casts from _MIN definitions
Andreas Boll
aboll-guest at moszumanska.debian.org
Thu Oct 6 08:16:28 UTC 2016
This is an automated email from the git hooks/post-receive script.
aboll-guest pushed a commit to branch master
in repository libclc.
commit 6d784075bc56815b0fc493690572c893979abbdd
Author: Aaron Watry <awatry at gmail.com>
Date: Tue Oct 6 19:12:12 2015 +0000
integer: remove explicit casts from _MIN definitions
The spec says (section 6.12.3, CL version 1.2):
The macro names given in the following list must use the values
specified. The values shall all be constant expressions suitable
for use in #if preprocessing directives.
This commit addresses the second part of that statement.
Reviewed-by: Jan Vesely <jan.vesely at rutgers.edu>
Reviewed-by: Tom Stellard <tom at stellard.net>
CC: Moritz Pflanzer <moritz.pflanzer14 at imperial.ac.uk>
CC: Serge Martin <edb+libclc at sigluy.net>
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@249445 91177308-0d34-0410-b5e6-96231b3b80d8
---
generic/include/clc/integer/definitions.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/generic/include/clc/integer/definitions.h b/generic/include/clc/integer/definitions.h
index 89de232..0079c30 100644
--- a/generic/include/clc/integer/definitions.h
+++ b/generic/include/clc/integer/definitions.h
@@ -1,14 +1,14 @@
#define CHAR_BIT 8
#define INT_MAX 2147483647
-#define INT_MIN ((int)(-2147483647 - 1))
+#define INT_MIN (-2147483647 - 1)
#define LONG_MAX 0x7fffffffffffffffL
#define LONG_MIN (-0x7fffffffffffffffL - 1)
#define CHAR_MAX SCHAR_MAX
#define CHAR_MIN SCHAR_MIN
#define SCHAR_MAX 127
-#define SCHAR_MIN ((char)(-127 - 1))
+#define SCHAR_MIN (-127 - 1)
#define SHRT_MAX 32767
-#define SHRT_MIN ((short)(-32767 - 1))
+#define SHRT_MIN (-32767 - 1)
#define UCHAR_MAX 255
#define USHRT_MAX 65535
#define UINT_MAX 0xffffffff
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opencl/libclc.git
More information about the Pkg-opencl-commits
mailing list