Clang 3.9 reports a compilation warning about ENABLE_EXCEPTION_SCOPE_VERIFICATION
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Sep 2016 15:12:54 +0000 (15:12 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Sep 2016 15:12:54 +0000 (15:12 +0000)
https://bugs.webkit.org/show_bug.cgi?id=162718

Patch by Fujii Hironori <Hironori.Fujii@sony.com> on 2016-09-29
Reviewed by Alex Christensen.

Clang 3.9 reports a following compilation warning:
  Source/JavaScriptCore/runtime/VM.h:656:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]

* wtf/Platform.h: Changed the definition of ENABLE_EXCEPTION_SCOPE_VERIFICATION not to use 'defined'.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@206580 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WTF/ChangeLog
Source/WTF/wtf/Platform.h

index ba7a557..3349f66 100644 (file)
@@ -1,3 +1,15 @@
+2016-09-29  Fujii Hironori  <Hironori.Fujii@sony.com>
+
+        Clang 3.9 reports a compilation warning about ENABLE_EXCEPTION_SCOPE_VERIFICATION
+        https://bugs.webkit.org/show_bug.cgi?id=162718
+
+        Reviewed by Alex Christensen.
+
+        Clang 3.9 reports a following compilation warning:
+          Source/JavaScriptCore/runtime/VM.h:656:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
+
+        * wtf/Platform.h: Changed the definition of ENABLE_EXCEPTION_SCOPE_VERIFICATION not to use 'defined'.
+
 2016-09-28  Mark Lam  <mark.lam@apple.com>
 
         Re-enable StringView life-cycle checking.
index 83d2499..7f51136 100644 (file)
 #endif
 
 #ifndef ENABLE_EXCEPTION_SCOPE_VERIFICATION
-#define ENABLE_EXCEPTION_SCOPE_VERIFICATION (!defined(NDEBUG))
+#ifdef NDEBUG
+#define ENABLE_EXCEPTION_SCOPE_VERIFICATION 0
+#else
+#define ENABLE_EXCEPTION_SCOPE_VERIFICATION 1
+#endif
 #endif
 
 /* Pick which allocator to use; we only need an executable allocator if the assembler is compiled in.