This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: signed vs unsigned pointer warning
- From: Andreas Schwab <schwab at suse dot de>
- To: "Dave Korn" <dk at artimi dot com>
- Cc: "'Morten Welinder'" <terra at gnome dot org>, <gcc at gcc dot gnu dot org>
- Date: Wed, 22 Sep 2004 23:56:53 +0200
- Subject: Re: signed vs unsigned pointer warning
- References: <NUTMEGODkUqESudbgsy00000021@NUTMEG.CAM.ARTIMI.COM>
"Dave Korn" <dk@artimi.com> writes:
> Which I don't think you can, since you can't store negative numbers
> in an unsigned type.
Actually you can, due to the modulo behaviour of unsigned integers.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."