From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id V8xlLN4phGF3fgAAWB0awg (envelope-from ) for ; Thu, 04 Nov 2021 14:43:42 -0400 Received: by simark.ca (Postfix, from userid 112) id 9F1261F0C1; Thu, 4 Nov 2021 14:43:42 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id DF18C1ECEB for ; Thu, 4 Nov 2021 14:43:41 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 03B243857C7E for ; Thu, 4 Nov 2021 18:43:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 03B243857C7E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1636051421; bh=kwygM56JtvHEE/R+yqbcX6svj3yyZrN5+9n3ADC4h2s=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=qZh/QURZBjn4zWZdH2HgcOSGtONWRSOjc+5vHOmHPvbdK/5QDkfMg5SakGyMKY8Hm xWfFv9AKx3Ij29Mgjgg2WfMLviVXG2EyTDXL6mk+4HZpwoX9XPFIPEZimu/wqNRSc3 1B3uYFb6BLjd5PfYf0F5RSu3+NGG1Gdz/o6csR2w= Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 5ABF73858439 for ; Thu, 4 Nov 2021 18:43:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5ABF73858439 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 1A4IhE1F028575 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 4 Nov 2021 14:43:18 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 1A4IhE1F028575 Received: from [10.0.0.11] (192-222-157-6.qc.cable.ebox.net [192.222.157.6]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 072841ECEB; Thu, 4 Nov 2021 14:43:13 -0400 (EDT) Message-ID: <543b67d0-07de-13db-5f73-0f74cc315174@polymtl.ca> Date: Thu, 4 Nov 2021 14:43:13 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.1 Subject: Re: gdb: disable -Wmissing-prototypes warning w/gcc Content-Language: en-US To: Andrew Burgess , Simon Marchi , gdb-patches@sourceware.org References: <20200303223442.330-1-simon.marchi@efficios.com> <20211104121716.GE918204@redhat.com> <32f7539b-55e6-80c4-0032-a41532eeb933@polymtl.ca> In-Reply-To: <32f7539b-55e6-80c4-0032-a41532eeb933@polymtl.ca> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Thu, 4 Nov 2021 18:43:14 +0000 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Simon Marchi via Gdb-patches Reply-To: Simon Marchi Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" > Just wondering, does anybody care about building GDB with a compiler > other than GCC and Clang? Because another way that excludes the warning > just for gcc (rather than include it for anything that isn't gcc) would > be (in pseudo code): > > diff --git a/gdbsupport/warning.m4 b/gdbsupport/warning.m4 > index 46036fa461e8..33a729a60d5d 100644 > --- a/gdbsupport/warning.m4 > +++ b/gdbsupport/warning.m4 > @@ -150,7 +150,7 @@ then > [WARN_CFLAGS="${WARN_CFLAGS} $w"], > [] > ) > - else > + elif (compiler is not gcc) or (warning is not -Wmissing-prototypes); then > AC_COMPILE_IFELSE( > [AC_LANG_PROGRAM([], [])], > [WARN_CFLAGS="${WARN_CFLAGS} $w"], > > If that works, I think it would be preferable, but otherwise I think > your patch is OK. Please push whatever makes the most sense to you, so > we can finally get rid of this warning :). > > Simon > Hmm, actually using $GCC doesn't work: it gets set to yes even when building with clang. I think it means more "does the compiler supports the GNU extension", which the clang compiler supports, for the most part. And the goal is to have -Wmissing-prototypes when building with clang. Simon