Title: [255467] trunk/Source/WTF
Revision
255467
Author
[email protected]
Date
2020-01-30 16:15:47 -0800 (Thu, 30 Jan 2020)

Log Message

`FALLTHROUGH` macro isn't properly defined when building Objective-C files using Clang
https://bugs.webkit.org/show_bug.cgi?id=206637

Reviewed by Darin Adler.

Allow the `FALLTHROUGH` macro to be defined properly when building with either GCC
or Clang.

* wtf/Compiler.h:

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (255466 => 255467)


--- trunk/Source/WTF/ChangeLog	2020-01-30 23:59:33 UTC (rev 255466)
+++ trunk/Source/WTF/ChangeLog	2020-01-31 00:15:47 UTC (rev 255467)
@@ -1,3 +1,15 @@
+2020-01-30  Conrad Shultz  <[email protected]>
+
+        `FALLTHROUGH` macro isn't properly defined when building Objective-C files using Clang
+        https://bugs.webkit.org/show_bug.cgi?id=206637
+
+        Reviewed by Darin Adler.
+
+        Allow the `FALLTHROUGH` macro to be defined properly when building with either GCC
+        or Clang.
+
+        * wtf/Compiler.h:
+
 2020-01-30  Yusuke Suzuki  <[email protected]>
 
         [WTF] Remove PackedIntVector

Modified: trunk/Source/WTF/wtf/Compiler.h (255466 => 255467)


--- trunk/Source/WTF/wtf/Compiler.h	2020-01-30 23:59:33 UTC (rev 255466)
+++ trunk/Source/WTF/wtf/Compiler.h	2020-01-31 00:15:47 UTC (rev 255467)
@@ -204,9 +204,12 @@
 
 #elif !defined(FALLTHROUGH) && !defined(__cplusplus)
 
-#if COMPILER(GCC)
+#if COMPILER(GCC_COMPATIBLE) && defined(__has_attribute)
+// Break out this #if to satisy some versions Windows compilers.
+#if __has_attribute(fallthrough)
 #define FALLTHROUGH __attribute__ ((fallthrough))
 #endif
+#endif
 
 #endif // !defined(FALLTHROUGH) && defined(__cplusplus) && defined(__has_cpp_attribute)
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to