8073994: STATIC_ASSERT use of __LINE__ is wrong
authorkbarrett
Tue, 03 Mar 2015 19:47:49 -0500
changeset 29691 c539e3e94ef1
parent 29689 dc72789f83ae
child 29692 26a04a7a88df
8073994: STATIC_ASSERT use of __LINE__ is wrong Reviewed-by: dholmes, ehelin
hotspot/src/share/vm/utilities/debug.hpp
--- a/hotspot/src/share/vm/utilities/debug.hpp	Tue Mar 17 15:53:55 2015 +0100
+++ b/hotspot/src/share/vm/utilities/debug.hpp	Tue Mar 03 19:47:49 2015 -0500
@@ -222,9 +222,8 @@
 template<bool x> struct STATIC_ASSERT_FAILURE;
 template<> struct STATIC_ASSERT_FAILURE<true> { enum { value = 1 }; };
 
-#define STATIC_ASSERT(Cond)                             \
-  typedef char STATIC_ASSERT_FAILURE_ ## __LINE__ [     \
-    STATIC_ASSERT_FAILURE< (Cond) >::value ]
+#define STATIC_ASSERT(Cond) \
+  typedef char STATIC_ASSERT_DUMMY_TYPE[ STATIC_ASSERT_FAILURE< (Cond) >::value ]
 
 // out of shared space reporting
 enum SharedSpaceType {