Sender: rich AT phekda DOT freeserve DOT co DOT uk Message-ID: <3EAE2D6D.5E329F3F@phekda.freeserve.co.uk> Date: Tue, 29 Apr 2003 08:44:45 +0100 From: Richard Dawe X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.23 i586) X-Accept-Language: de,fr MIME-Version: 1.0 To: Andris Pavenis CC: djgpp-workers AT delorie DOT com, Ben Peddell , rudd AT cyberoptics DOT com Subject: Re: gcc 3.x breaks ABI compatibility? [Was: Re: Bug 00314 -- div() still broken] References: <3e9c6920$0$21928$afc38c87@> <3EABA5AA DOT 99B8EDE3 AT phekda DOT freeserve DOT co DOT uk> <200304280954 DOT 02899 DOT pavenis AT latnet DOT lv> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp-workers AT delorie DOT com 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/ ]