This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch, ia64] Fix unaligned accesses on IA64 from dwarf2out.c
- From: Steve Ellcey <sje at cup dot hp dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: Steve Ellcey <sje at catbert dot cup dot hp dot com>, gcc-patches at gcc dot gnu dot org, jakub at redhat dot com
- Date: Mon, 08 Aug 2011 15:22:34 -0700
- Subject: Re: [patch, ia64] Fix unaligned accesses on IA64 from dwarf2out.c
- References: <201108051754.p75HsR004415@catbert.cup.hp.com> <4E3C3A44.4040408@redhat.com>
- Reply-to: sje at cup dot hp dot com
On Fri, 2011-08-05 at 11:45 -0700, Richard Henderson wrote:
> On 08/05/2011 10:54 AM, Steve Ellcey wrote:
> > - unsigned char checksum[16];
> > struct md5_ctx ctx;
> > + unsigned char checksum[16];
>
> How about
>
> struct md5_data
> {
> struct md5_ctx ctx;
> unsigned char checksum[16];
> };
>
> struct md5_data md5;
>
> with the structure definition somewhere interesting?
> If no where else, just dwarf2out.c file scope.
>
>
> r~
Oh, so after I declare md5, I call md5_finish_ctx like:
md5_finish_ctx (&md5.ctx, md5.checksum);
Is that what you are proposing? It seems a bit odd to put checksum in a
a structure with ctx just to guarantee its alignment and not to pass
them around as one entity, but I guess it's no worse then using a union.
Steve Ellcey
sje@cup.hp.com