Re: recent libalias changes

From: David Malone <dwmalone_at_maths.tcd.ie>
Date: Mon, 5 Jul 2004 17:10:59 +0100
On Mon, Jul 05, 2004 at 05:30:49PM +0200, des_at_des.no wrote:
> Divacky Roman <xdivac02_at_stud.fit.vutbr.cz> writes:
> > I can sadly report that recent changes to libalias made by des doesnt
> > help me use natd with -Os built libalias.. it still doesnt work ;(
> 
> Could you please try to figure out exactly which optimization option
> breaks libalias?  It is most likely one of these:

With Divacky's help we localised his problem to alias.c. The twowords
function breaks the strick aliasing rule, try replacing it with:

static __inline int
twowords(void *p)
{
        unsigned char *c = p;

        return ((((unsigned short)c[1] + (unsigned short)c[3])<<8) + c[0] + c[2];
}

	David.
Received on Mon Jul 05 2004 - 14:11:01 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:00 UTC