This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Warning patrol: a question.


> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]