This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [v3] Fix codecvt_members_char.cc for big endian machines
- From: Paolo Carlini <pcarlini at unitus dot it>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 26 Mar 2002 00:24:53 +0100
- Subject: Re: [v3] Fix codecvt_members_char.cc for big endian machines
- References: <3C9F257C.8030500@unitus.it> <20020325151153.F15489@redhat.com>
Richard Henderson wrote:
>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)))).
>
Thanks. I suspected something was not really perfect with the
reinterpret_cast. I will test the change ASAP.
Ciao, Paolo.