[Webkit-unassigned] [Bug 166047] New: Macro expansion producing 'defined' has undefined behavior
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Dec 19 16:21:56 PST 2016
https://bugs.webkit.org/show_bug.cgi?id=166047
Bug ID: 166047
Summary: Macro expansion producing 'defined' has undefined
behavior
Classification: Unclassified
Product: WebKit
Version: WebKit Nightly Build
Hardware: Macintosh
OS: macOS 10.12
Status: NEW
Severity: Minor
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: ttsugrii at fb.com
When compiling JSC with master build of clang, I get many errors (warnings which are treated as errors) like:
/tmp/WebKit/Source/JavaScriptCore/API/JSBase.h:141:122: note: expanded from macro 'JSC_OBJC_API_ENABLED'
#define JSC_OBJC_API_ENABLED (defined(__clang__) && defined(__APPLE__) && ((defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && !defined(__i386__)) || (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE)))
^
In file included from /tmp/WebKit/Source/JavaScriptCore/testRegExp.cpp:26:
/tmp/WebKit/Source/JavaScriptCore/runtime/JSGlobalObject.h:594:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
The fix is trivial - instead of checks like #if FOO, #if FOO == 1 has to be used and instead of #define FOO (...), #if (...) #define FOO = 1 #else #define FOO = 0 #endif should be used.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20161220/7557393c/attachment-0001.html>
More information about the webkit-unassigned
mailing list