https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49928
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Or to put it another way, the premise of this bug:
Only workaround for "-Wundef" is "defined(Macro) && Macro"
is false. There are other workarounds.
Another one is to get rid of the "clever" PLATFORM(QT) macros and just write
the tests out in full:
#if (defined(WTF_PLATFORM_MAC) && WTF_PLATFORM_MAC) \
|| (defined(WTF_PLATFORM_QT) && WTF_PLATFORM_QT \
&& defined(WTF_USE_QTKIT) && WTF_USE_QTKIT)
Another one is to use the fact the macro is defined as the condition, and not
have a two-part condition (defined *and* non-zero):
#if defined(WTF_PLATFORM_MAC) \
|| (defined(WTF_PLATFORM_QT) && defined(WTF_USE_QTKIT))
The problem is the idiom used in the WebKit code, and adding a new builtin is
not the right solution to that problem. A new builtin wouldn't help for older
compilers anyway.