[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-chat] Strange struct problem
From: |
Daniel O'Connor |
Subject: |
Re: [avr-chat] Strange struct problem |
Date: |
Fri, 9 Dec 2005 11:11:10 +1030 |
User-agent: |
KMail/1.8.2 |
On Fri, 9 Dec 2005 10:52, Russell Shaw wrote:
> > Any help gratefully received!
>
> Beware of structure padding leaving holes.
>
> http://www.eskimo.com/~scs/C-faq/q2.12.html
> http://www.eskimo.com/~scs/C-faq/q2.13.html
Hmm, I tried..
struct foo {
uint8_t a;
uint8_t b;
uint8_t c;
uint8_t d;
uint8_t e;
} __attribute__ ((packed)) abc = {
1,
2,
3,
4,
5
};
but there is no change in behaviour.
I would not expect GCC to pad [too much] on AVR anyway because the processor
doesn't require aligned access.
--
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
-- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C
pgppOUC2neuRk.pgp
Description: PGP signature
- [avr-chat] Strange struct problem, Daniel O'Connor, 2005/12/08
- Re: [avr-chat] Strange struct problem, Daniel O'Connor, 2005/12/08
- Re: [avr-chat] Strange struct problem, Russell Shaw, 2005/12/08
- Re: [avr-chat] Strange struct problem,
Daniel O'Connor <=
- RE: [avr-chat] Strange struct problem, Larry Barello, 2005/12/08
- RE: [avr-chat] Strange struct problem, Larry Barello, 2005/12/08
- Re: [avr-chat] Strange struct problem, Russell Shaw, 2005/12/08
- Re: [avr-chat] Strange struct problem, Daniel O'Connor, 2005/12/08
- RE: [avr-chat] Strange struct problem, Larry Barello, 2005/12/08
- Re: [avr-chat] Strange struct problem, Daniel O'Connor, 2005/12/08
- Re: [avr-chat] Strange struct problem, Ian Caddy, 2005/12/09
- Re: [avr-chat] Strange struct problem, Daniel O'Connor, 2005/12/09