linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* IO, ANSI vs GCC structs
@ 2003-07-25 15:30 Kent Borg
  2003-07-25 15:51 ` Bret Indrelee
  0 siblings, 1 reply; 7+ messages in thread
From: Kent Borg @ 2003-07-25 15:30 UTC (permalink / raw)
  To: linuxppc-embedded


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/

^ permalink raw reply	[flat|nested] 7+ messages in thread
[parent not found: <5.1.0.14.2.20030725123123.03855f58@mail.ebshome.net>]

end of thread, other threads:[~2003-07-25 21:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-07-25 15:30 IO, ANSI vs GCC structs Kent Borg
2003-07-25 15:51 ` 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

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).