[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [lwip-users] [PATCH] fix warning for gcc and possible unaligned acce
From: |
Curt McDowell |
Subject: |
RE: [lwip-users] [PATCH] fix warning for gcc and possible unaligned access |
Date: |
Tue, 25 Apr 2006 11:09:28 -0700 |
More observations about structure packing:
In gcc, it seems the __attribute__((packed)) is inherited by all
sub-structures. But in armcc, the compiler disallows normal structures from
being members of __packed structures. So simply making 'struct ipaddr'
unpacked isn't going to work for all compilers. Maybe there should be a packed
and unpacked version of struct ipaddr, so that the compiler doesn't have to
generate unaligned support code everywhere struct ipaddr is used.
I think Pedro is right and just about any compiler that supports packed
structures must support assigning, referencing or copying unaligned uint32
members. ip_addr2 first came into use in etharp.c:1.55 on 04/27/04 to fix bug
#8708. Leon or Timmy, do you happen to remember which was the offending
compiler that couldn't generate the right code for this case? Or was the code
really doing something illegal like *(uint32 *)&ipaddr?
Regards,
Curt McDowell
Broadcom Corp.
- Re: [lwip-users] [PATCH] fix warning for gcc and possible unaligned access, (continued)
- Re: [lwip-users] [PATCH] fix warning for gcc and possible unaligned access, Pedro Alves, 2006/04/21
- RE: [lwip-users] [PATCH] fix warning for gcc and possible unaligned access, Curt McDowell, 2006/04/21
- Re: [lwip-users] [PATCH] fix warning for gcc and possible unaligned access, Pedro Alves, 2006/04/21
- RE: [lwip-users] [PATCH] fix warning for gcc and possible unaligned access, Curt McDowell, 2006/04/21
- Re: [lwip-users] [PATCH] fix warning for gcc and possible unaligned access, Timmy Brolin, 2006/04/22
- Re: [lwip-users] [PATCH] fix warning for gcc and possible unaligned access, Pedro Alves, 2006/04/22
- [lwip-users] Re: unix simhost, YH, 2006/04/22
- Re: [lwip-users] [PATCH] fix warning for gcc and possible unaligned access, Timmy Brolin, 2006/04/24
- Re: [lwip-users] [PATCH] fix warning for gcc and possible unaligned access, pedro alves, 2006/04/25
- Re: [lwip-users] [PATCH] fix warning for gcc and possible unaligned access, Timmy Brolin, 2006/04/25
- RE: [lwip-users] [PATCH] fix warning for gcc and possible unaligned access,
Curt McDowell <=
- Re: [lwip-users] [PATCH] fix warning for gcc and possible unaligned access, Timmy Brolin, 2006/04/25
- Re: [lwip-users] [PATCH] fix warning for gcc and possible unaligned access, Pedro Alves, 2006/04/25
- Re: [lwip-users] [PATCH] fix warning for gcc and possible unaligned access, Timmy Brolin, 2006/04/25
- RE: [lwip-users] [PATCH] fix warning for gcc and possible unaligned access, Curt McDowell, 2006/04/25
- Re: [lwip-users] [PATCH] fix warning for gcc and possible unaligned access, Timmy Brolin, 2006/04/25
- Re: [lwip-users] [PATCH] fix warning for gcc and possible unaligned access, Pedro Alves, 2006/04/25
- Re: [lwip-users] [PATCH] fix warning for gcc and possible unaligned access, Timmy Brolin, 2006/04/26
- Re: [lwip-users] [PATCH] fix warning for gcc and possible unaligned access, Derek Guerdon, 2006/04/27
- Re: [lwip-users] [PATCH] fix warning for gcc and possible unaligned access, Leon Woestenberg, 2006/04/30
- RE: [lwip-users] [PATCH] fix warning for gcc and possible unaligned access, Curt McDowell, 2006/04/25