[Top][All Lists]

[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

From: Len Chisholm
Subject: [lwip-devel] [bug #19052] ppp.h version 1.2 has broken Macros GETSORT/LONG
Date: Wed, 14 Feb 2007 07:57:15 +0000
User-agent: 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.

Len Chisholm.


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]