mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-25 13:54:38 +02:00
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:
parent
e8d1955b5e
commit
d2a5b70cdf
6 changed files with 27 additions and 46 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue