lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] [bug #9191] Compiler problem with #define's


From: snortreader
Subject: Re: [lwip-devel] [bug #9191] Compiler problem with #define's
Date: Thu, 24 May 2007 13:05:52 +0800

 
 

snortreader
2007-05-24

发件人: Tom Evans
发送时间: 2007-05-24 12:39:31
收件人: Tom Evans; address@hidden
抄送:
主题: [lwip-devel] [bug #9191] Compiler problem with #define's
 
 
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 mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-devel

reply via email to

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