[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #9191] Compiler problem with #define's
From: |
Tom Evans |
Subject: |
[lwip-devel] [bug #9191] Compiler problem with #define's |
Date: |
Thu, 24 May 2007 04:38:59 +0000 |
User-agent: |
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MathPlayer 2.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727) |
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
fix.
If anyone knows who "Anonymous" is, please forward this information back to
them.
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?9191>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [lwip-devel] [bug #9191] Compiler problem with #define's,
Tom Evans <=