[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [lwip-users] IP Address Display Functions
From: |
Kieran Mansley |
Subject: |
RE: [lwip-users] IP Address Display Functions |
Date: |
Tue, 25 Aug 2009 10:24:27 +0100 |
On Mon, 2009-08-24 at 14:58 -0400, Bill Auerbach wrote:
> If there's an argument that packing is
> required for a single member struct, I'm interesting seeing the reason or
> proof that it's required.
I wonder if it's because without it a compiler would be free to pad it
up to a 64-bit field for example. A single member struct differs here
from a normal variable because I'm not sure if packing on an outer
struct would also force packing on the inner struct.
All this is conjecture rather than chapter and verse though.
In general a compiler will only using padding to align fields to their
natural boundary (e.g. a 16-bit field to a 16-bit boundary) but if the
spec allows a compiler to use it in other cases, e.g. to align sizes of
fields to a more efficient size (e.g. a 16-bit field to a word), then we
may still need to explicitly pack it.
It might be worth looking through the CVS history to work out why this
particular case was introduced in the first place.
Kieran
- [lwip-users] Possible deadlock in LWIP 1.3.1 RC1, Eran Rundstein, 2009/08/23
- Re: [lwip-users] Possible deadlock in LWIP 1.3.1 RC1, Kieran Mansley, 2009/08/24
- [lwip-users] IP Address Display Functions, Chris Strahm, 2009/08/24
- Re: [lwip-users] IP Address Display Functions, address@hidden, 2009/08/24
- RE: [lwip-users] IP Address Display Functions, Bill Auerbach, 2009/08/24
- Re: [lwip-users] IP Address Display Functions, Mandeep Sandhu, 2009/08/25
- Re: [lwip-users] IP Address Display Functions, Kieran Mansley, 2009/08/25
- RE: [lwip-users] IP Address Display Functions, Bill Auerbach, 2009/08/25
- RE: [lwip-users] IP Address Display Functions, Kieran Mansley, 2009/08/25
- RE: [lwip-users] IP Address Display Functions,
Kieran Mansley <=
- RE: [lwip-users] IP Address Display Functions, Kieran Mansley, 2009/08/25
- [lwip-users] Re: IP Address Display Functions, Jakob Stoklund Olesen, 2009/08/25
- RE: [lwip-users] Re: IP Address Display Functions, Bill Auerbach, 2009/08/25
- Re: [lwip-users] Re: IP Address Display Functions, address@hidden, 2009/08/25
- Re: [lwip-users] Re: IP Address Display Functions, address@hidden, 2009/08/25
- RE: [lwip-users] Re: IP Address Display Functions, Bill Auerbach, 2009/08/26
Re: [lwip-users] Possible deadlock in LWIP 1.3.1 RC1, Eran Rundstein, 2009/08/24
Re: [lwip-users] Possible deadlock in LWIP 1.3.1 RC1, address@hidden, 2009/08/24