From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 672 invoked by alias); 10 May 2018 15:16:54 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 654 invoked by uid 89); 10 May 2018 15:16:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 10 May 2018 15:16:52 +0000 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id w4AFGjAL030886 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 10 May 2018 11:16:50 -0400 Received: by simark.ca (Postfix, from userid 112) id 334E51F214; Thu, 10 May 2018 11:16:45 -0400 (EDT) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id A9BC01E5AF; Thu, 10 May 2018 11:16:44 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 10 May 2018 16:47:00 -0000 From: Simon Marchi To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [RFA] Fix the clang build In-Reply-To: <20180510144039.9474-1-tom@tromey.com> References: <20180510144039.9474-1-tom@tromey.com> Message-ID: <7622331bcb94377c233dae7435f8183f@polymtl.ca> X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.6 X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Thu, 10 May 2018 15:16:45 +0000 X-IsSubscribed: yes X-SW-Source: 2018-05/txt/msg00239.txt.bz2 On 2018-05-10 10:40, Tom Tromey wrote: > Simon pointed out that gdb would not build with clang, due to the > addition of -Wimplicit-fallthrough. This patch fixes the problem by > using -Wimplicit-fallthrough=3 -- this does not work with clang, > bypassing the issue. > > Tested by rebuilding with both gcc and clang; and also by verifying > that -Wimplicit-fallthrough=3 is used in the gcc build. > > I will file a follow-up bug to convert the fall-through comments to a > form that can be used by both clang and gcc. Thanks, that patch is fine with me. To be clear for those who might not be aware of the mechanism: the configure script tests each warning flag to see if it's supported by the current compiler. Since -Wimplicit-fallthrough=3 is not supported by clang, it won't be included. This means that we won't get the fallthrough warnings when building with clang. I think it's fine, since we get them through gcc, so an unintended fallthrough would be found pretty quickly anyway. Simon