From owner-freebsd-current@FreeBSD.ORG Tue Nov 20 23:38:24 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 5C35C16A418 for ; Tue, 20 Nov 2007 23:38:24 +0000 (UTC) (envelope-from kip.macy@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.181]) by mx1.freebsd.org (Postfix) with ESMTP id 434EB13C43E for ; Tue, 20 Nov 2007 23:38:24 +0000 (UTC) (envelope-from kip.macy@gmail.com) Received: by wa-out-1112.google.com with SMTP id k17so2717781waf for ; Tue, 20 Nov 2007 15:38:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=cp79TkxrWLU4s+/+EhVKyV7nyq+9UHYzr5Z4OzO0o6s=; b=SF51Ea6XHvD07dpv2XCboMm0LXETXDhtVCpdSKGgwlrbtYwzhmwZGbY6NJZP9J2+vtbt6u6bOhjuLURrCh9LA86i4SfBf64MOMsZ7bqigWH4kIEvhQau10pdgjhBmIZSvqglDg5owAtpSFaNBd2G3bBU3LRpDB+bA9SLd1iz/1w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=kfGt3chOxhfrLT+frvhnZqU88gPg+sclRAqgcJdMLgkpeikF4cJgxYsusL3JKYknTx7vBiC/JHJreaPV9tHXS3FT2aj1JJpEVrQMBFygzedQSSMFmlvzwSG/oGVmKmEeJ+qcOXt9GYfa7NKrj/Q8PrAxwmGTk9DcExgJEB8UP0s= Received: by 10.114.93.17 with SMTP id q17mr215822wab.1195601902848; Tue, 20 Nov 2007 15:38:22 -0800 (PST) Received: by 10.114.13.15 with HTTP; Tue, 20 Nov 2007 15:38:22 -0800 (PST) Message-ID: Date: Tue, 20 Nov 2007 15:38:22 -0800 From: "Kip Macy" To: "John Birrell" , "John Merryweather Cooper" , "????????? Bill Hacker" , freebsd-current@freebsd.org In-Reply-To: <20071120231938.GA13120@owl.midgard.homeip.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <543425.44000.qm@web50704.mail.re2.yahoo.com> <20071120224337.GB12810@what-creek.com> <20071120231938.GA13120@owl.midgard.homeip.net> Cc: 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:38:24 -0000 On Nov 20, 2007 3:19 PM, Erik Trulsson wrote: > 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. > The kernel will never be compiled with strict aliasing on. It introduces the possibility for too many impossible to diagnose bugs. -Kip