This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Basic frontend question about layout
> So for an example, Ada layouts the records themselves and some times
> has a different order of the fields than the layouted offsets.
The Ada compiler uses stor-layout.c by default, like all the other compilers.
It does its own layout only when it has nothing to do, i.e. when the user has
specified the layout with a representation clause; and, in this case, it does
sort the fields by increasing offsets (see components_to_record) because the
middle-end expects the canonical order in various circumstances.
--
Eric Botcazou