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
s...@cup.hp.com

Reply via email to