Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759822AbcLBMdo (ORCPT ); Fri, 2 Dec 2016 07:33:44 -0500 Received: from mx2.suse.de ([195.135.220.15]:35664 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759022AbcLBMdm (ORCPT ); Fri, 2 Dec 2016 07:33:42 -0500 Subject: Re: [PATCH v4] Fixes for compiling with clang To: Peter Foley References: <20161126182006.24815-1-pefoley2@pefoley.com> <20161128064446.4892-1-pefoley2@pefoley.com> Cc: LKML , linux-kbuild@vger.kernel.org, Behan Webster From: Michal Marek Message-ID: Date: Fri, 2 Dec 2016 13:33:39 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1074 Lines: 23 On 2016-12-01 19:13, Peter Foley wrote: > On Tue, Nov 29, 2016 at 6:22 AM, Michal Marek wrote: >> Dne 28.11.2016 v 07:44 Peter Foley napsal(a): >> This adds new -Wno-* options also for the gcc case, is there a reason >> for this? Also, the -Wno-missing-field-initializers option is not >> available in some old gccs, so we would need a HOSTCC equivalent of >> cc-disable-warning. >> >> Michal > > It appeared that the conditional was simply reversed, as > -fno-delete-null-pointer-checks is only supported by gcc, and > explicitly not supported by clang. > (see https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/Makefile?id=61163efae02040f66a95c8ed17f4407951ba58fa) > It could be that the fno-delete-null-pointer-checks option was simply > misplaced, and the Wno-options should still be guarded by if(clang), > would that be a better approach? I think so. The -Wno-* options had not been present before clang support was added. It really looks like the -fno-delete-null-pointer-checks should not be there. Added Behan to CC. Michal