summaryrefslogtreecommitdiffstats
path: root/Utilities/KWIML/test
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-01-09 13:51:59 (GMT)
committerBrad King <brad.king@kitware.com>2018-01-09 13:51:59 (GMT)
commit8a53242df98be391070d7a34590e127c28e2e985 (patch)
tree7b4b0617491af83136094fdb51c8e74608018b37 /Utilities/KWIML/test
parent2c089d80de3945e4f08f13557d59e04cbc942a60 (diff)
parent6e921648d292c81f2d0e62803f45a4f79aa892ca (diff)
downloadCMake-8a53242df98be391070d7a34590e127c28e2e985.zip
CMake-8a53242df98be391070d7a34590e127c28e2e985.tar.gz
CMake-8a53242df98be391070d7a34590e127c28e2e985.tar.bz2
Merge branch 'upstream-KWIML' into update-kwiml
* upstream-KWIML: KWIML 2018-01-09 (9c2d6cae)
Diffstat (limited to 'Utilities/KWIML/test')
-rw-r--r--Utilities/KWIML/test/test_int_format.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/Utilities/KWIML/test/test_int_format.h b/Utilities/KWIML/test/test_int_format.h
index 24dcdfb..2e0310c 100644
--- a/Utilities/KWIML/test/test_int_format.h
+++ b/Utilities/KWIML/test/test_int_format.h
@@ -8,6 +8,7 @@
#if defined(_MSC_VER)
# pragma warning (push)
+# pragma warning (disable:4309) /* static_cast trunction of constant value */
# pragma warning (disable:4310) /* cast truncates constant value */
#endif
@@ -17,7 +18,13 @@
# define LANG "C "
#endif
-#define VALUE(T, U) (T)((U)0xab << ((sizeof(T)-1)<<3))
+#if defined(__cplusplus) && !defined(__BORLANDC__)
+# define STATIC_CAST(t,v) static_cast<t>(v)
+#else
+# define STATIC_CAST(t,v) (t)(v)
+#endif
+
+#define VALUE(T, U) STATIC_CAST(T, STATIC_CAST(U, 0xab) << ((sizeof(T)-1)<<3))
#define TEST_C_(C, V, PRI, T, U) \
{ \