Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Apr 2003 17:42:09 -0500 (CDT)
From:      Loren James Rittle <rittle@latour.rsch.comm.mot.com>
To:        hackers@freebsd.org
Subject:   Re: gcc iussue or ... ?
Message-ID:  <200304142242.h3EMg9d8056897@latour.rsch.comm.mot.com>
In-Reply-To: <20030413124626.5e782421.kabaev@bellatlantic.net> (message from Alexander Kabaev on Sun, 13 Apr 2003 12:46:26 -0400)
References:  <5.2.0.9.2.20030411082040.02604e90@194.184.65.4> <200304120241.h3C2fQCc061882@latour.rsch.comm.mot.com> <20030413012636.GA76030@dragon.nuxi.com> <20030413124626.5e782421.kabaev@bellatlantic.net>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <20030413124626.5e782421.kabaev@bellatlantic.net>,
Alexander Kabaev<kabaev@bellatlantic.net> writes:

> On Sat, 12 Apr 2003 18:26:36 -0700
> "David O'Brien" <obrien@freebsd.org> wrote:

>> I'm not sure we should change FreeBSD to do something that purposfully
>> produces wrong semantics. [...]

> I think there is a slight confusion here. It is -fconserve-space flag
> what introduces wrong semantics, [...]

Agreed (with Alex).  David, for the record: Here is the short test
which displays the exact change:

; cat >t.C
int t;
<EOF>
; /usr/bin/g++ -c t.C # gcc 2.95.4 20020320 [FreeBSD]
; size t.o
   text    data     bss     dec     hex filename
      0       4       0       4       4 t.o
; /usr/local/beta-gcc/bin/g++ -c t.C # FSF mainline
; size t.o
   text    data     bss     dec     hex filename
      0       0       4       4       4 t.o

This is OK since there is no concept of "common merging" in C++.  At
one point, I knew the reason why older g++ assigned no data to BSS.
Either way, this was a purposeful change in g++ (I can't cite the
thread off-hand but I read it at the time).  The system compiler on
ref5/beast is doing section assignment for C++ the "new way".

David, I do think that you found a section of code (which was
originally written in 1996 before g++ used BSS) that could be
tightened up in light of the new section rules used by g++.  Anyone
willing to post the patch ``attn: Mark Mitchell/Jason Merrill'' to
gcc-patches?  Tree munging is outside my area of expertise.

Regards,
Loren



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200304142242.h3EMg9d8056897>