This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: 20040309-1.c vs overflow being undefined
- From: Andreas Schwab <schwab at suse dot de>
- To: Andrew Pinski <pinskia at physics dot uc dot edu>
- Cc: gcc at gcc dot gnu dot org
- Date: Sun, 27 Nov 2005 18:37:48 +0100
- Subject: Re: 20040309-1.c vs overflow being undefined
- References: <200511271721.jARHLZsL017078@earth.phy.uc.edu>
Andrew Pinski <pinskia@physics.uc.edu> writes:
> sorry wrong number, I had meant 32769.
> if (foo (32769) != 1)
> abort ();
I think with 16 bit ints you should get 0 here, since (int)32769 ==
-32767, which is less than 32767.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."