Mail Archives: djgpp/2003/04/29/04:20:39
Hello.
Ben Peddell wrote:
>
> Richard Dawe wrote:
[snip]
> > I've just looked at the gcc 2.95.2 sources and it looks like
> > -fpcc-struct-return (i.e.: use memory) is the default there.
> >
> > The gcc 3.2.2 source seems to default to using registers. See the end
> > gcc/config/i386/djgpp.h:
> >
> > /* Don't default to pcc-struct-return, because gcc is the only
> > compiler,
> > and we want to retain compatibility with older gcc versions. */
> > #define DEFAULT_PCC_STRUCT_RETURN 0
>
> I wonder where they got that from?
Andris copied them from the configuration file for another i386 platform.
> Did they accidentally put that in the wrong target? What systems default
> to structures in registers? Watch for ABI bugs of this sort in them.
FreeBSD, Cygwin default to using registers.
Linux, NetBSD ELF don't.
> GCC 3.2 still had structures in memory, and it is supposed to have had
> an ABI change from the previous GCCs.
[snip]
Which ABI? The C++ ABI changed between gcc 2.x and 3.x. It also changed later
in the gcc 3.x, because bugs were fixed in early versions of gcc 3.x, which
changed the ABI (for the better).
I thought the C ABI was set in stone.
Bye, Rich =]
--
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]
- Raw text -