From owner-svn-src-all@FreeBSD.ORG Fri May 11 13:33:23 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54C091065670; Fri, 11 May 2012 13:33:22 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 0F3018FC08; Fri, 11 May 2012 13:33:22 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:839:5834:5e28:89f8] (unknown [IPv6:2001:7b8:3a7:0:839:5834:5e28:89f8]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 415735C37; Fri, 11 May 2012 15:33:21 +0200 (CEST) Message-ID: <4FAD1523.2040501@FreeBSD.org> Date: Fri, 11 May 2012 15:33:23 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120425 Thunderbird/13.0 MIME-Version: 1.0 To: Colin Percival References: <201205111237.q4BCbGX2083596@svn.freebsd.org> <20120511124820.GN2358@deviant.kiev.zoral.com.ua> <4FAD0DF4.9000609@freebsd.org> In-Reply-To: <4FAD0DF4.9000609@freebsd.org> X-Enigmail-Version: 1.5a1pre Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Konstantin Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Gabor Kovesdan Subject: Re: svn commit: r235267 - in head/usr.bin/sort: . nls X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 13:33:23 -0000 On 2012-05-11 15:02, Colin Percival wrote:> On 05/11/12 05:48, Konstantin Belousov wrote: >> On Fri, May 11, 2012 at 12:37:16PM +0000, Gabor Kovesdan wrote: >>> +bool byte_sort = false; + +static wchar_t **wmonths = NULL; +static >>> unsigned char **cmonths = NULL; >> >> Such initializations are useless. You only increase the size of the binary >> on the disk as the consequence. > > I just tested this hypothesis, and found no change in binary size using > either clang or gcc46. Presumably they're smart enough to ignore explicit > (and unnecessary) initializations of statics to zero. This is default behaviour, which can be toggled with gcc's (and clang's) command line option -fno-zero-initialized-in-bss: http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-fno_002dzero_002dinitialized_002din_002dbss-744