On platforms with SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2_5), such as
x86 and MIPS, there are several "dereferencing type-punned pointer
will break strict-aliasing rules" warnings from unwind-dw2-fde.c
(accessing _Unwind_Ptr and pointer types through a char[] array, when
only the other way round is valid under C aliasing rules).
This patch fixes these warnings by using memcpy in an inline function
to extract the values from the array. Tested x86, and tested on MIPS
(all three ABIs) that it also eliminates the warnings there.
2012-11-21 Joseph Myers <joseph@codesourcery.com>
* sysdeps/generic/unwind-dw2-fde.c (get_pc_begin): New function.
(fde_unencoded_compare): Use get_pc_begin instead of type-punning.
(add_fdes): Likewise.
(linear_search_fdes): Likewise.
(binary_search_unencoded_fdes): Likewise.