lwip-users
[Top][All Lists]
Advanced

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

RE: [lwip-users] Trouble at compile time with __packed attribute.


From: Bill Auerbach
Subject: RE: [lwip-users] Trouble at compile time with __packed attribute.
Date: Fri, 9 Oct 2009 08:31:12 -0400

>OK, thank it's compiling well now.  Witt a packed structure , the
>documentation of Keil ARM compiler says that all the members inherit the
>__packed attribute of the structure.
>But all the pointers for access to a packed structure have to be defined
>with the __packed too in order to access well to deferenced structs like
>:
>
>__packed struct packed_struct_name *ptr;

They shouldn't have to be defined like this - packed doesn't apply to a
pointer but to the type the pointer points to.  They must be handling it
like the const/volatile qualifiers where at the time of the dereference it
does matter that the pointer has the qualifier.  It doesn't matter for
__packed because that effects the storage, not the referencing of the data.

>the Lwip code take cares about that point (that could depends of the
>compiler) ?

It doesn't matter.  I'd be surprised if the compiler is requiring this
declaration.

Bill





reply via email to

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