From owner-freebsd-current@FreeBSD.ORG Sun Dec 1 04:39:16 2013 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E51DD62E for ; Sun, 1 Dec 2013 04:39:16 +0000 (UTC) Received: from mail-qe0-x234.google.com (mail-qe0-x234.google.com [IPv6:2607:f8b0:400d:c02::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9C3B71F0F for ; Sun, 1 Dec 2013 04:39:16 +0000 (UTC) Received: by mail-qe0-f52.google.com with SMTP id ne12so11997791qeb.39 for ; Sat, 30 Nov 2013 20:39:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=I7NQI1GiE6Yvnpebx/gCiJRV+wbmV+CBSNTT9GeEjSA=; b=eU/HvaOtHvG1epP0taM8W+ZsHIig4yBTHYgCarVAbUei9uvIArH83D+IMG13eYa0zk Kg4Lyab7NXD5//6rNOWqPW39X3dHwpEOpNPoR/ssljqULW7neX5vIM+OfGujXDsqOmsv s/zZkbsckN5JxN675f11qWhJkDwco7DRR/dic= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=I7NQI1GiE6Yvnpebx/gCiJRV+wbmV+CBSNTT9GeEjSA=; b=ZJ3N38vKPkzQ1slXNRFYJ4pSm8pbOgOvKSwqT7CQUMJ+RDA7Hrh4HCIfCI9nFDjoCK TLUaA+k5AzHd/Dk7UOenifr6tppQBCxlpZmCWCOhvU8t861lyLASZIA1Sosqg49Ah0y1 0jCRoZdYU2iV/a14HJmr2lBvumOcqRChSiVJf6iI8A3URph7WE5PE1htpI/ZpfPPiCZ9 ZhT7PhcF5Vr58RAgM2FDvjaMXNH8LcKkv5zGH9kFstGEer4unBm7QjaKUVMW9glYFLQm t8rReFCwlvJG22Lu69foSwXgK2CRjlmEckZ09klno9svp8wTJxR1xtG0cxTqtHYm2j2M mPSg== X-Gm-Message-State: ALoCoQk2A7WU7TDcxo538OrBQk2/i9BumS6Ho7DFOz9WrsNQQuLDfQIeIHtAVOHHapvKzC+aru6s X-Received: by 10.224.123.211 with SMTP id q19mr611860qar.78.1385872755734; Sat, 30 Nov 2013 20:39:15 -0800 (PST) MIME-Version: 1.0 Received: by 10.96.86.42 with HTTP; Sat, 30 Nov 2013 20:38:45 -0800 (PST) In-Reply-To: References: <20131130135616.GA59496@kib.kiev.ua> From: Eitan Adler Date: Sat, 30 Nov 2013 23:38:45 -0500 Message-ID: Subject: Re: RFC: (Unconditionally) enable -fno-strict-overflow for kernel builds To: Peter Wemm Content-Type: text/plain; charset=UTF-8 Cc: Konstantin Belousov , Adrian Chadd , Dimitry Andric , "current@freebsd.org" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.16 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: Sun, 01 Dec 2013 04:39:17 -0000 On Sat, Nov 30, 2013 at 11:26 PM, Peter Wemm wrote: > On Sat, Nov 30, 2013 at 4:33 PM, Adrian Chadd wrote: > [..] >> Are you able to have clang/llvm/gcc tell us where/when code is relying >> on undefined behaviour? So we can, like, fix them? > > It wasn't all that long ago that we had this wonderful thing called > -Werror and had a clean kernel build. > > The problem is that gcc and clang have different warning sets. I seem > to recall we had -Werror on for gcc and off for clang. IMHO it would > be more useful to do it the other way around. Not all cases can be caught by static analysis. They would all be caught be the integer sanitizer. However, these have not yet been ported to FreeBSD. -- Eitan Adler