This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Basic frontend question about layout


Hi, folks,

I'm having trouble seeing how layout is specified at the GENERIC level
for RECORD_TYPEs.  The docs and comments in tree.def say that you cannot
rely on the order of fields of the type.  In stor-layout.c,
layout_types() seems to do the obvious thing, taking the fields in
order, but the docs make it sound like there is no way to be sure what
you'll get.

Theoretically this would mean that you couldn't even reliably link a
structure in two separate compilation units, which is bogus.

Could someone please clear up my confusion?

Thanks,
Jerry Quinn



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]