lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #26273] etharp.c : fix alignment issue in etharp_raw


From: Simon Goldschmidt
Subject: [lwip-devel] [bug #26273] etharp.c : fix alignment issue in etharp_raw
Date: Wed, 22 Apr 2009 10:48:47 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8

Follow-up Comment #5, bug #26273 (project lwip):

> would it be possible to use the SMEMCPY alternative?

I'm afraid that normally, our attitued towards compiler bugs is: don't use
bad code to work around them! In this, case, a function call instead of
load/store *is* bad code to me! However, since we already do that in other
places in etharp.c (in fact, the whole struct ip_addr2 seems to be a
compiler-bug-workaround), I could live with it.

The only question is whether this is the only line in the code that does not
work with that compiler, and I must say I'm not willing to adjust the complete
lwIP stack (there are many instances of unaligned, packed structs). For
example, what about the IP addresses in ethernet/IP packets? Since the
ethernet header is 14 bytes, thus the IP addresses are always unaligned (but
packed): does that work for you?

Couldn't it be that there exists another packing setting for that compiler
which would generate correct code?

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?26273>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.nongnu.org/





reply via email to

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