From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 108878 invoked by alias); 16 Jan 2019 20:49:10 -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 108508 invoked by uid 89); 16 Jan 2019 20:48:42 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=0.3 required=5.0 tests=BAYES_20,KAM_LAZY_DOMAIN_SECURITY,KAM_SHORT,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=Key, sk:schwab@, U*schwab, schwab@linux-m68k.org X-HELO: mail-out.m-online.net Received: from mail-out.m-online.net (HELO mail-out.m-online.net) (212.18.0.9) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 16 Jan 2019 20:48:40 +0000 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 43fznd5184z1r01f; Wed, 16 Jan 2019 21:48:37 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 43fznd4lzBz1qvWY; Wed, 16 Jan 2019 21:48:37 +0100 (CET) Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id HnjhpwjhIivw; Wed, 16 Jan 2019 21:48:36 +0100 (CET) Received: from igel.home (ppp-188-174-158-9.dynamic.mnet-online.de [188.174.158.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Wed, 16 Jan 2019 21:48:36 +0100 (CET) Received: by igel.home (Postfix, from userid 1000) id 18D562C11C9; Wed, 16 Jan 2019 21:48:35 +0100 (CET) From: Andreas Schwab To: Simon Marchi Cc: =?utf-8?B?0J/QsNCy0LXQuyDQmtGA0Y7QutC+0LI=?= , gdb-patches@sourceware.org Subject: Re: [PATCH] Do not expand macros to 'defined' References: <4943ce6216667607c40b630ecba6a4d1@polymtl.ca> X-Yow: I demand IMPUNITY! Date: Wed, 16 Jan 2019 20:49:00 -0000 In-Reply-To: <4943ce6216667607c40b630ecba6a4d1@polymtl.ca> (Simon Marchi's message of "Wed, 16 Jan 2019 15:02:23 -0500") Message-ID: <87h8e89vmk.fsf@igel.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2019-01/txt/msg00383.txt.bz2 On Jan 16 2019, Simon Marchi wrote: > The patch LGTM, I agree these macros are not really needed. But I am > confused, does this actually fix your c++ build? You mentioned you were > using g++ (and therefore cpp), which supposedly can handle this fine: > > https://gcc.gnu.org/onlinedocs/cpp/Defined.html > > If so, what did the error look like? This has nothing to do with C vs. C++, both have the same wording: If the token defined is generated as a result of this replacement process or use of the defined unary operator does not match one of the two specified forms prior to macro replacement, the behavior is undefined. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."