diff src/share/vm/utilities/globalDefinitions_sparcWorks.hpp @ 20287:b6a8cc1e0d92

8040121: Load variable through a pointer of an incompatible type in src/hotspot/src/share/vm: opto/output.cpp, runtime/sharedRuntimeTrans.cpp, utilities/globalDefinitions_visCPP.hpp Summary: Fixed parfait warnings in globalDefinitions files by using a union for casts. Reviewed-by: kvn
author thartmann
date Tue, 29 Jul 2014 13:54:16 +0200
parents f08d439fab8c
children 17caeb034a63
line wrap: on
line diff
--- a/src/share/vm/utilities/globalDefinitions_sparcWorks.hpp	Thu May 22 11:36:23 2014 -0400
+++ b/src/share/vm/utilities/globalDefinitions_sparcWorks.hpp	Tue Jul 29 13:54:16 2014 +0200
@@ -183,15 +183,6 @@
 typedef unsigned int       juint;
 typedef unsigned long long julong;
 
-//----------------------------------------------------------------------------------------------------
-// Special (possibly not-portable) casts
-// Cast floats into same-size integers and vice-versa w/o changing bit-pattern
-
-inline jint    jint_cast   (jfloat  x)           { return *(jint*   )&x; }
-inline jlong   jlong_cast  (jdouble x)           { return *(jlong*  )&x; }
-
-inline jfloat  jfloat_cast (jint    x)           { return *(jfloat* )&x; }
-inline jdouble jdouble_cast(jlong   x)           { return *(jdouble*)&x; }
 
 //----------------------------------------------------------------------------------------------------
 // Constant for jlong (specifying an long long constant is C++ compiler specific)