From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 14 15:43:29 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DDBE437B401; Mon, 14 Apr 2003 15:43:29 -0700 (PDT) Received: from motgate5.mot.com (motgate5.mot.com [144.189.100.105]) by mx1.FreeBSD.org (Postfix) with ESMTP id D7C4F43FBD; Mon, 14 Apr 2003 15:43:28 -0700 (PDT) (envelope-from rittle@latour.rsch.comm.mot.com) Received: from az33exr03.mot.com (az33exr03.mot.com [10.64.251.233]) by motgate5.mot.com (Motorola/Motgate5) with ESMTP id h3EMhSec009539; Mon, 14 Apr 2003 15:43:28 -0700 (MST) Received: from latour.rsch.comm.mot.com (latour.rsch.comm.mot.com [145.1.80.116])h3EMhPXL008360; Mon, 14 Apr 2003 17:43:26 -0500 Received: from latour.rsch.comm.mot.com (localhost.rsch.comm.mot.com [127.0.0.1])h3EMgAN8056900; Mon, 14 Apr 2003 17:42:10 -0500 (CDT) (envelope-from rittle@latour.rsch.comm.mot.com) Received: (from rittle@localhost) by latour.rsch.comm.mot.com (8.12.8/8.12.8/Submit) id h3EMg9d8056897; Mon, 14 Apr 2003 17:42:09 -0500 (CDT) Date: Mon, 14 Apr 2003 17:42:09 -0500 (CDT) From: Loren James Rittle Message-Id: <200304142242.h3EMg9d8056897@latour.rsch.comm.mot.com> To: hackers@freebsd.org 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> User-Agent: SEMI/1.14.4 (Hosorogi) FLIM/1.14.4 (=?ISO-8859-4?Q?Kashiharaji?= =?ISO-8859-4?Q?ng=FE-mae?=) LEMI/1.14.1 Emacs/21.2 (i386--freebsd) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.4 - "Hosorogi") Content-Type: text/plain; charset=US-ASCII Subject: Re: gcc iussue or ... ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: rittle@labs.mot.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2003 22:43:30 -0000 In article <20030413124626.5e782421.kabaev@bellatlantic.net>, Alexander Kabaev writes: > On Sat, 12 Apr 2003 18:26:36 -0700 > "David O'Brien" 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; ; /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