Follow-up Comment #1, bug #9191 (project lwip):
The original (anonymous) poster should read the NC308 compiler manual.
In there it states that by default the compiler blatantly disobeys ANSI, and
if ANSI operation is required the compiler flag "-fETI" is required. Quoting
from the manual:
Function: Extends char type or signed char type data to int type data to
perform operation (extension as per ANSI rules).
Supplement: In ANSI standards, the char-type or singed char-type data is
always extended into the int type when evaluated. This extension is provided
to prevent a problem in char-type arithmetic operations, e.g., c1 = c2 * 2 /
c3; that the char type overflows in the middle of operation, and that the
result takes on an unexpected value.
And in the case of the original "GETSHORT()" macro, the operation "s = *cp++
< 8" results in an explicit load of "s" with ZERO.
This is broken default compiler operation, but they do provide and document a
If anyone knows who "Anonymous" is, please forward this information back to
Reply to this item at:
Message sent via/by Savannah
lwip-devel mailing list