Sender: rich AT phekda DOT freeserve DOT co DOT uk Message-ID: <3EABD66F.59393BFF@phekda.freeserve.co.uk> Date: Sun, 27 Apr 2003 14:09:03 +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: DJGPP workers Subject: [Fwd: Bug 00314 -- div() still broken] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp-workers AT delorie DOT com Ben Peddell wrote: > > Richard Dawe wrote: > > > Hello. > > > > Ben Peddell wrote: > >> [snip] > >> > >> OK. GCC 3.2.1 has -fpcc-struct-return by default in DJGPP, whilst GCC > >> 3.2.2 has -freg-struct-return by default in DJGPP. > >> GCC 3.2.2 may need to be configured to make -fpcc-struct-return the > >> default, to maintain compatibility with the DJGPP 2.03 libraries. Or, > >> the libraries may need to be re-compiled for GCC 3.2.2, and marked as > >> such. > >> > >> These options are in `info gcc "Invoking GCC" "Code Gen Options"' > > > > > > After rummaging around a bit more: > > > > It's possible that 3.2.1 was broken. There were some ABI regressions > > in 3.2.1 that were fixed in 3.2.2: > > > > http://gcc.gnu.org/gcc-3.2/changes.html#3.2.2 > > This does not mention DJGPP. > Linux is mentioned. However, it returns the same as DJGPP - structures > in memory (with gcc 3.2). > > > > > PR/9506 is the one: > > > > http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=9506 > > > > gcc defaults to using -fpcc-struct-return, but what does it actually > > use for 2.95.2 and 3.2.2? > > > > 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? > 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. > > GCC 3.2 still had structures in memory, and it is supposed to have had > an ABI change from the previous GCCs. > > > 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? > > > > Thanks, bye, Rich =] > > -- Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]