[comp.unix.i386] g++ compiler

baker@hpfcmgw.HP.COM (Jim Baker) (08/15/89)

On a related (vaguely) topic....

Does the GNU gcc/g++ compilers/code generators conform to the 386 ABI?
I suppose the crux of the answer relies on alignment, data structure padding,
and object file formats.

Send your experiences/insights to:

Jim Baker
ARPA: baker@hpfcma.HP.COM
uucp: hplabs!hpfcma!baker

james@raid.dell.com (James Van Artsdalen) (08/21/89)

In <8640001@hpfcmgw.HP.COM>, baker@hpfcmgw.HP.COM (Jim Baker) wrote:

> Does the GNU gcc/g++ compilers/code generators conform to the 386
> ABI?  I suppose the crux of the answer relies on alignment, data
> structure padding, and object file formats.

I have no idea whose "ABI" you're referring to.  Some of the things
you mention are not things that applications care about, such as
alignment of freestanding objects or object file formats.  I assume
you mean PCC, since in the 386 SysV unix world that is the only
standard I know of.  Sequent uses a different standard, and Xenix
might also.

The answer to the question you meant to ask is that gcc works just
fine, with the exception of a few lingering nits in COFF debugging
output using nested struct/unions.  Alignment of code and data is the
same as PCC uses.  I'm not sure about structure padding: I make a
strong effort not to write programs that depend on such things.  gcc
does not produce object files: it produces assembly source (as does
PCC), which get processed by an external assembler and linker.
Therefore gcc object files look the same as PCC object files.
-- 
James R. Van Artsdalen          james@raid.dell.com       "Live Free or Die"
DCC Corporation       9505 Arboretum Blvd Austin TX 78759       512-338-8789