From owner-freebsd-current@FreeBSD.ORG Tue Nov 20 23:34:57 2007 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A5AA16A419 for ; Tue, 20 Nov 2007 23:34:57 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from ch-smtp02.sth.basefarm.net (ch-smtp02.sth.basefarm.net [80.76.149.213]) by mx1.freebsd.org (Postfix) with ESMTP id EC59513C45D for ; Tue, 20 Nov 2007 23:34:56 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from c83-253-25-183.bredband.comhem.se ([83.253.25.183]:61694 helo=falcon.midgard.homeip.net) by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1IucNb-0007I2-7S for freebsd-current@freebsd.org; Wed, 21 Nov 2007 00:19:45 +0100 Received: (qmail 28406 invoked from network); 21 Nov 2007 00:19:38 +0100 Received: from owl.midgard.homeip.net (10.1.5.7) by falcon.midgard.homeip.net with ESMTP; 21 Nov 2007 00:19:38 +0100 Received: (qmail 13171 invoked by uid 1001); 21 Nov 2007 00:19:38 +0100 Date: Wed, 21 Nov 2007 00:19:38 +0100 From: Erik Trulsson To: John Birrell Message-ID: <20071120231938.GA13120@owl.midgard.homeip.net> Mail-Followup-To: John Birrell , John Merryweather Cooper , ????????? Bill Hacker , freebsd-current@freebsd.org References: <543425.44000.qm@web50704.mail.re2.yahoo.com> <20071120224337.GB12810@what-creek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20071120224337.GB12810@what-creek.com> User-Agent: Mutt/1.5.16 (2007-06-09) X-Originating-IP: 83.253.25.183 X-Scan-Result: No virus found in message 1IucNb-0007I2-7S. X-Scan-Signature: ch-smtp02.sth.basefarm.net 1IucNb-0007I2-7S 90f162c0eecc9fc1daea88bb524d97cf Cc: ????????? Bill Hacker , freebsd-current@freebsd.org Subject: Re: Tinderbox X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Nov 2007 23:34:57 -0000 On Tue, Nov 20, 2007 at 10:43:37PM +0000, John Birrell wrote: > On Tue, Nov 20, 2007 at 07:35:42AM -0800, John Merryweather Cooper wrote: > > Could not -fno-strict-aliasing be considered as just another WARN level? > > At least then, there might be some pressure to eliminate strict aliasing > > warnings as a necessary component to moving to a higher WARN level. > > > > This is something I'd like to do right now as "a step in the right > direction". > > RCS file: /u/freebsd/cvsup/src/src/share/mk/bsd.sys.mk,v > retrieving revision 1.43 > diff -r1.43 bsd.sys.mk > 11,12d10 > < NO_WERROR= > < > 78a77,80 > > .if defined(NO_WARNS) || (defined(WARNS) && ${WARNS} == 0) > > CFLAGS += -fno-strict-aliasing > > .endif > > > > > and remove it from the default CFLAGS in sys.mk > You seem to misunderstand what -fno-strict-aliasing does. Its purpose is not to disable some warnings, but to disable certain optimizations which can easily cause not-quite-correct code to behave differently than the programmer intended. Such incorrect code is unfortunately fairly common, which is why -fno-strict-aliasing is often needed. Which optimizations are enabled or disabled should not depend on which WARN level is used. If gcc gives a warning about strict aliasing this means that there is almost certainly a bug in the code which need to be fixed, to make it safe to compile with the extra optimizations that an assumption of strict aliasing enables. -- Erik Trulsson ertr1013@student.uu.se