https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118542
Hubert Tong <hstong at ca dot ibm.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hstong at ca dot ibm.com
--- Comment #5 from Hubert Tong <hstong at ca dot ibm.com> ---
(In reply to Andrew Pinski from comment #4)
> https://github.com/llvm/llvm-project/commit/
> b2348f4ced639e7247cf3a0bba900dd3ca855996
The "compilers seem to not have differing behavior in that case" claim made as
part of the Clang rationale warning less about the function-like macro case is
can be disproved.
https://godbolt.org/z/5se6Pe83Y demonstrates, three different behaviours using
five extant implementations for the following:
#define PLATFORM_HAS_ALPHA 1
#define HAS(X) (defined(PLATFORM_HAS_ ## X) && (PLATFORM_HAS_ ## X))
#define NOT(X) !(X)
#if NOT(HAS(ALPHA))
static_assert(false, "Hi");
#endif