Mercurial > hg > graal-compiler
diff src/share/vm/opto/output.cpp @ 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 | 0bf37f737702 |
children | 69ea58782b1a |
line wrap: on
line diff
--- a/src/share/vm/opto/output.cpp Thu May 22 11:36:23 2014 -0400 +++ b/src/share/vm/opto/output.cpp Tue Jul 29 13:54:16 2014 +0200 @@ -783,9 +783,9 @@ // grow downwards in all implementations. // (If, on some machine, the interpreter's Java locals or stack // were to grow upwards, the embedded doubles would be word-swapped.) - jint *dp = (jint*)&d; - array->append(new ConstantIntValue(dp[1])); - array->append(new ConstantIntValue(dp[0])); + jlong_accessor acc = { jlong_cast(d) }; + array->append(new ConstantIntValue(acc.words[1])); + array->append(new ConstantIntValue(acc.words[0])); #endif break; } @@ -802,9 +802,9 @@ // grow downwards in all implementations. // (If, on some machine, the interpreter's Java locals or stack // were to grow upwards, the embedded doubles would be word-swapped.) - jint *dp = (jint*)&d; - array->append(new ConstantIntValue(dp[1])); - array->append(new ConstantIntValue(dp[0])); + jlong_accessor acc = { d }; + array->append(new ConstantIntValue(acc.words[1])); + array->append(new ConstantIntValue(acc.words[0])); #endif break; }