This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Do not expand macros to 'defined'


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.

-- 
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."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]