Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/lib/libc/string



On Sat, Feb 23, 2008 at 19:55:43 +0100, Joerg Sonnenberger wrote:

> Now that I finally understood that the problem here is that the unsigned
> char is expanded to int due to the second operator, I would strongly
> prefer to case the 7 and not the left side to u_int. Comments?

That wouldn't work.  You are thinking here about "usual arithmetic
conversions", but they are not applied to the operadns of the shift.
Instead they are subject to integer promotions only.

As Christos said, lhs of the shift should be (at least) unsigned int.

SY, Uwe
-- 
uwe%stderr.spb.ru@localhost                       |       Zu Grunde kommen
http://snark.ptc.spbu.ru/~uwe/          |       Ist zu Grunde gehen


Home | Main Index | Thread Index | Old Index