Summary: | Building with GCC 7.1.x spews lots of “warning: this use of "defined" may not be portable [-Wexpansion-to-defined]“ | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Adrian Perez <aperez> | ||||
Component: | Tools / Tests | Assignee: | Adrian Perez <aperez> | ||||
Status: | RESOLVED DUPLICATE | ||||||
Severity: | Normal | CC: | achristensen, lforschler, mcatanzaro, ysuzuki | ||||
Priority: | P2 | ||||||
Version: | Other | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Adrian Perez
2017-05-25 16:06:49 PDT
Created attachment 311307 [details]
Patch
I know you already have a patch here and normally I'd favor the bug with the patch, but there's good discussion in bug #167643 so please reattach it there. My concern is that these macros are all undefined behavior, so we should consider eliminating them. *** This bug has been marked as a duplicate of bug 167643 *** Comment on attachment 311307 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=311307&action=review > Source/cmake/OptionsCommon.cmake:78 > + if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "7.1.0") > + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-expansion-to-defined") > + endif () No need to check compiler version, just enable it unconditionally. Look for wherever our other warning flags are used; we probably don't need to add a new line, just add it to wherever the other ones are. |