This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: warning: right shift count >= width of type
- From: Andreas Schwab <schwab at suse dot de>
- To: Paul Schlie <schlie at comcast dot net>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Tue, 30 Nov 2004 01:22:33 +0100
- Subject: Re: warning: right shift count >= width of type
- References: <BDD11A9E.815E%schlie@comcast.net>
Paul Schlie <schlie@comcast.net> writes:
> It likely needs to define what (x << z) means if:
>
> - z lesser-or-equal-to 0, [i.e. does (x << -1) == (x >> 1) ?]
Since left and right shift are usually separate insns this would result in
a runtime penalty.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, 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."