Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@polymtl.ca>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: "Павел Крюков" <kryukov@frtk.ru>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Do not expand macros to 'defined'
Date: Wed, 16 Jan 2019 20:59:00 -0000	[thread overview]
Message-ID: <275ec5da5d0654e7b87227e5373a6148@polymtl.ca> (raw)
In-Reply-To: <87h8e89vmk.fsf@igel.home>

On 2019-01-16 15:48, Andreas Schwab wrote:
> On Jan 16 2019, Simon Marchi <simon.marchi@polymtl.ca> 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.

That's why I was confused, the purpose of Pavel's patch that was 
replaced by this one is C++-oriented:

https://sourceware.org/ml/gdb-patches/2019-01/msg00241.html

So in the end it looks like the issue is indeed not about C++, but about 
his usage of -Wextra (-Wexpansion-to-defined).

Simon


      reply	other threads:[~2019-01-16 20:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-16  6:34 Павел Крюков
2019-01-16 20:02 ` Simon Marchi
2019-01-16 20:38   ` Pavel Kryukov
2019-01-16 21:11     ` Simon Marchi
2019-01-16 20:49   ` Andreas Schwab
2019-01-16 20:59     ` Simon Marchi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=275ec5da5d0654e7b87227e5373a6148@polymtl.ca \
    --to=simon.marchi@polymtl.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=kryukov@frtk.ru \
    --cc=schwab@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox