Mercurial > hg > graal-jvmci-8
diff src/share/vm/utilities/globalDefinitions_gcc.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 | 78bbf4d43a14 |
children | ddce0b7cee93 |
line wrap: on
line diff
--- a/src/share/vm/utilities/globalDefinitions_gcc.hpp Thu May 22 11:36:23 2014 -0400 +++ b/src/share/vm/utilities/globalDefinitions_gcc.hpp Tue Jul 29 13:54:16 2014 +0200 @@ -167,17 +167,6 @@ typedef uint32_t juint; typedef uint64_t julong; -//---------------------------------------------------------------------------------------------------- -// Special (possibly not-portable) casts -// Cast floats into same-size integers and vice-versa w/o changing bit-pattern -// %%%%%% These seem like standard C++ to me--how about factoring them out? - Ungar - -inline jint jint_cast (jfloat x) { return *(jint* )&x; } -inline jlong jlong_cast (jdouble x) { return *(jlong* )&x; } -inline julong julong_cast (jdouble x) { return *(julong* )&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 canstant is C++ compiler specific)