autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: changing "configure" to default to "gcc -g -O2 -fwrapv ..."


From: Joe Buck
Subject: Re: changing "configure" to default to "gcc -g -O2 -fwrapv ..."
Date: Sat, 30 Dec 2006 22:55:50 -0800
User-agent: Mutt/1.4.1i

On Sat, Dec 30, 2006 at 08:57:12PM -0500, Richard Kenner wrote:
> > I suppose there is
> > 
> >       *hv = (HOST_WIDE_INT) -(unsigned HOST_WIDE_INT) h1;
> > 
> > to make it safe.
> 
> Can't that conversion overflow?

Not on a two's complement machine, and I know of no gcc ports
to a non-two's-complement host machine.  unary minus is
well-defined for all unsigned values even on non-two's-complement
machines, but for those we'd have to worry about the mapping
between unsigned and signed types.






 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]