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

Fixed parfait warnings in globalDefinitions files by using a union for casts.

Reviewed-by: kvn
This commit is contained in:
Tobias Hartmann 2014-07-29 13:54:16 +02:00
parent e8d1955b5e
commit d2a5b70cdf
6 changed files with 27 additions and 46 deletions

View file

@ -116,16 +116,6 @@ typedef unsigned short jushort;
typedef unsigned int juint;
typedef unsigned __int64 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; }
//----------------------------------------------------------------------------------------------------
// Non-standard stdlib-like stuff: