This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Warning patrol: a question.
- To: jan dot vanmale at fenk dot wau dot nl
- Subject: Re: Warning patrol: a question.
- From: Joern Rennecke <amylaar at redhat dot com>
- Date: Thu, 28 Jun 2001 12:16:52 +0100 (BST)
- Cc: gcc at gcc dot gnu dot org
> I don't know why this code is here. I see three possibilities.
>
> 1) We are just being carefull, this code is not necessary.
> 2) INPUT_COUNT is sometimes negative for a good reason, some
> other code in the compiler relies on this.
> 3) Occasionally, INPUT_COUNT is negative but this really is a bug.
> The above code is needed to cover it up.
It is 4) INPUT_COUNT is negative because the user said so.
gcc might warn about this, but for code generation purposes, it assumes
that the user might have some reason to do this, and takes care not
to 'optimize' this negative shift, bit to instruct the hardware to
do just that.