Mail Archives: djgpp-workers/2003/04/29/04:19:21
Hello.
Andris Pavenis wrote:
>
> On Sunday 27 April 2003 12:40, 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
> >
> > Why is this defined? I couldn't see a ChangeLog entry for djgpp.h. AFAICT
> > this breaks backwards compatibility, i.e.: the opposite of what the
> > comment says. Is there something I'm missing?
>
> I copied it from other i386 targets. GCC-3.2.2 didn't compile without
> defining DEFAULT_PCC_STRUCT_RETURN, as there is no default
Not all i386 targets define DEFAULT_PCC_STRUCT_RETURN to be 0. Linux and
NetBSD ELF don't.
I think we need to use the same as the default for 2.95.x, i.e.:
#define DEFAULT_PCC_STRUCT_RETURN 1
This is a pretty critical bug. Do you have any plans to rebuild gcc 3.2.2 (or
3.2.3) with this fix?
Thanks, bye, Rich =]
--
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]
- Raw text -