Changeset 255467 in webkit


Ignore:
Timestamp:
Jan 30, 2020 4:15:47 PM (4 years ago)
Author:
Conrad Shultz
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:
Location:
trunk/Source/WTF
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r255460 r255467  
     12020-01-30  Conrad Shultz  <conrad_shultz@apple.com>
     2
     3        `FALLTHROUGH` macro isn't properly defined when building Objective-C files using Clang
     4        https://bugs.webkit.org/show_bug.cgi?id=206637
     5
     6        Reviewed by Darin Adler.
     7
     8        Allow the `FALLTHROUGH` macro to be defined properly when building with either GCC
     9        or Clang.
     10
     11        * wtf/Compiler.h:
     12
    1132020-01-30  Yusuke Suzuki  <ysuzuki@apple.com>
    214
  • trunk/Source/WTF/wtf/Compiler.h

    r247837 r255467  
    205205#elif !defined(FALLTHROUGH) && !defined(__cplusplus)
    206206
    207 #if COMPILER(GCC)
     207#if COMPILER(GCC_COMPATIBLE) && defined(__has_attribute)
     208// Break out this #if to satisy some versions Windows compilers.
     209#if __has_attribute(fallthrough)
    208210#define FALLTHROUGH __attribute__ ((fallthrough))
     211#endif
    209212#endif
    210213
Note: See TracChangeset for help on using the changeset viewer.