From: Kent Borg <kentborg@borg.org>
To: linuxppc-embedded@lists.linuxppc.org
Subject: IO, ANSI vs GCC structs
Date: Fri, 25 Jul 2003 11:30:26 -0400 [thread overview]
Message-ID: <20030725113026.E29161@borg.org> (raw)
The PPC arch likes to access physical devices with C structures that
correspond to a memory map of device registers. But a colleague says
that structure layout is not guaranteed. In fact, he cited two
instances when he got burned by assuming he could predict structure
layout. But neither of those examples were with GCC.
Does GCC make guarantees beyond what ANSI requires? Is there some
subtle detail that forces struct layout ("volatile" in the definition
perhaps)?
Thanks,
-kb
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
next reply other threads:[~2003-07-25 15:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-25 15:30 Kent Borg [this message]
2003-07-25 15:51 ` IO, ANSI vs GCC structs Bret Indrelee
2003-07-25 16:19 ` Wolfgang Denk
2003-07-25 17:47 ` Kent Borg
2003-07-25 19:22 ` Wolfgang Denk
2003-07-25 21:45 ` Paul Mackerras
[not found] <5.1.0.14.2.20030725123123.03855f58@mail.ebshome.net>
2003-07-25 19:59 ` Bret Indrelee
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030725113026.E29161@borg.org \
--to=kentborg@borg.org \
--cc=linuxppc-embedded@lists.linuxppc.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).