diff --git a/CHANGES.current b/CHANGES.current index 17a8c8f93..018fc4548 100644 --- a/CHANGES.current +++ b/CHANGES.current @@ -1,6 +1,31 @@ Version 1.3.29 (In progress) ============================ +03/02/2006: wsfulton + [Java] + Removed extra (void *) cast when casting pointers to and from jlong as this + was suppressing gcc's "dereferencing type-punned pointer will break strict-aliasing rules" + warning. This warning could be ignored in versions of gcc prior to 4.0, but now the + warning is useful as gcc -O2 and higher optimisation levels includes -fstrict-aliasing which + generates code that doesn't work with these casts. The assignment is simply never made. + Please use -fno-strict-aliasing to both suppress the warning and fix the bad assembly + code generated. Note that the warning is only generated by the C compiler, but not + the C++ compiler, yet the C++ compiler will also generate broken code. Alternatively use + -Wno-strict-aliasing to suppress the warning for gcc-3.x. The typemaps affected + are the "in" and "out" typemaps in java.swg and arrays_java.swg. Users ought to fix + their own typemaps to do the same. Note that removal of the void * cast simply prevents + suppression of the warning for the C compiler and nothing else. Typical change: + + From: + %typemap(in) SWIGTYPE * %{ $1 = *($&1_ltype)(void *)&$input; %} + To: + %typemap(in) SWIGTYPE * %{ $1 = *($&1_ltype)&$input; %} + + From: + %typemap(out) SWIGTYPE * %{ *($&1_ltype)(void *)&$result = $1; %} + To: + %typemap(out) SWIGTYPE * %{ *($&1_ltype)&$result = $1; %} + 03/02/2006: mkoeppe [Guile -scm] Add typemaps for "long long"; whether the generated code compiles, however, depends