[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #19052] ppp.h version 1.2 has broken Macros GETSORT/LO
[lwip-devel] [bug #19052] ppp.h version 1.2 has broken Macros GETSORT/LONG
Wed, 14 Feb 2007 07:57:15 +0000
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)
Follow-up Comment #1, bug #19052 (project lwip):
I expect the second line of the macro should contain (s)<<=8;
I think this is attempting to work around a problem which recurs (for me)
many times throughout lwip.
There are many macros which attempt to construct 16- or 32-bit quantities by
taking a number of bytes and shifting them left various amounts.
Unfortunately, in my compiler at least, taking a byte/char and shifting it
left by more than 7 bits is optimised completely away UNLESS the value is
first cast to a u16_t or a u32_t.
Reply to this item at:
Message sent via/by Savannah