From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id cAFYAW8oW2GidQAAWB0awg (envelope-from ) for ; Mon, 04 Oct 2021 12:14:39 -0400 Received: by simark.ca (Postfix, from userid 112) id E34961EE1A; Mon, 4 Oct 2021 12:14:38 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_DYNAMIC, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.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 40F081E813 for ; Mon, 4 Oct 2021 12:14:38 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CDFE43858423 for ; Mon, 4 Oct 2021 16:14:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CDFE43858423 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1633364077; bh=OLPbshKLr2+7CrT6mY4PFDh3dpLVOacUyaFkXuKiEy0=; 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=lCEPysMVp9jKhWLYHHIVGqxcpzlywQM78xUDp1GASkBDYxBKtoXJwKgtLuokedFvB PjZiTtjFbVno6vufkO9AK9SeGaPW8Ar6WlVrAJSfLoki2GNt2xIEuhZ/Y6kqdqNhpP hAwVeo+0eTp/oEgTOBZXWHFX1k9gjk77echhN/fA= Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 60319385801A for ; Mon, 4 Oct 2021 16:14:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 60319385801A 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 194GE4iC026645 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 4 Oct 2021 12:14:09 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 194GE4iC026645 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 68E9F1E813; Mon, 4 Oct 2021 12:14:04 -0400 (EDT) Message-ID: <6d03de6a-0760-2894-3845-dd9dec5c703a@polymtl.ca> Date: Mon, 4 Oct 2021 12:14:04 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.1 Subject: Re: [PATCH] gdb: Fix build error on macOS Content-Language: en-US To: Enze Li , gdb-patches@sourceware.org References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Mon, 4 Oct 2021 16:14:04 +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" On 2021-10-04 06:03, Enze Li via Gdb-patches wrote: > PR build/28413 notes that the gdb master fails to build on macOS. > > Based on De Morgan's law, the expression > !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) > is equal to (!defined __GNUC__ || defined __clang__ || !__OPTIMIZE). > The expression above looks weird, maybe there are some problems with > this way of judging. When any one of the conditions is established, the > subsequent judgment will be ignored. > > This patch works around the issue by rewriting the expression of > judgment after referring to the nearby notes. > > Tested by building on x86_64-Linux and macOS(Mojave & Catalina). Thanks for addressing this. Please send the patch to upstream gnulib, to the following mailing list: https://lists.gnu.org/mailman/listinfo/bug-gnulib Then we can pull the updated feedback. Otherwise, we can always have a local patch in binutils-gdb/gnulib/patches, but if the change is correct, I don't see why it wouldn't be accepted in upstream gnulib. Thanks, Simon