[v3] Fix codecvt_members_char.cc for big endian machines

Richard Henderson rth@redhat.com
Mon Mar 25 15:11:00 GMT 2002


On Mon, Mar 25, 2002 at 02:26:20PM +0100, Paolo Carlini wrote:
> -  int_type 		i_lit_base[25] = 
> +  char 		        i_lit_base[50] = 
[...]
> +  const int_type* 	i_lit = reinterpret_cast<int_type*>(i_lit_base);

If you're going to do this, you have to make sure that the
i_lit_base array is sufficiently aligned.

Use __attribute__((aligned(__alignof__(int_type)))).


r~



More information about the Gcc-patches mailing list