Bug 206637

Summary: `FALLTHROUGH` macro isn't properly defined when building Objective-C files using Clang
Product: WebKit Reporter: Conrad Shultz <conrad_shultz>
Component: Web Template FrameworkAssignee: Conrad Shultz <conrad_shultz>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cdumez, cmarcelo, commit-queue, conrad_shultz, darin, dbates, ews-watchlist, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Conrad Shultz
Reported 2020-01-22 18:29:56 PST
In the non-C++ case, FALLTHROUGH is defined only when using GCC.
Attachments
Patch (1.28 KB, patch)
2020-01-22 18:36 PST, Conrad Shultz
no flags
Patch (1.30 KB, patch)
2020-01-28 13:53 PST, Conrad Shultz
no flags
Patch (1.46 KB, patch)
2020-01-30 11:55 PST, Conrad Shultz
no flags
Conrad Shultz
Comment 1 2020-01-22 18:30:34 PST
Radar WebKit Bug Importer
Comment 2 2020-01-22 18:30:49 PST
Conrad Shultz
Comment 3 2020-01-22 18:32:16 PST
Conrad Shultz
Comment 4 2020-01-22 18:36:36 PST
Darin Adler
Comment 5 2020-01-22 20:47:37 PST
Comment on attachment 388506 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=388506&action=review > Source/WTF/wtf/Compiler.h:207 > -#if COMPILER(GCC) > +#if COMPILER(GCC) || (COMPILER(CLANG) && __has_attribute(fallthrough)) Why doesn’t the section above with __has_cpp_attribute work? I believe that’s what’s supposed to cover this.
Darin Adler
Comment 6 2020-01-22 20:48:02 PST
Comment on attachment 388506 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=388506&action=review >> Source/WTF/wtf/Compiler.h:207 >> +#if COMPILER(GCC) || (COMPILER(CLANG) && __has_attribute(fallthrough)) > > Why doesn’t the section above with __has_cpp_attribute work? I believe that’s what’s supposed to cover this. Oh, non-C++, I see
Darin Adler
Comment 7 2020-01-22 20:48:43 PST
Comment on attachment 388506 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=388506&action=review >>> Source/WTF/wtf/Compiler.h:207 >>> +#if COMPILER(GCC) || (COMPILER(CLANG) && __has_attribute(fallthrough)) >> >> Why doesn’t the section above with __has_cpp_attribute work? I believe that’s what’s supposed to cover this. > > Oh, non-C++, I see Since all the versions of CLANG we compile with have this support, I suggest just writing: #if COMPILE(GCC_COMPATIBLE)
Conrad Shultz
Comment 8 2020-01-23 15:07:26 PST
(In reply to Darin Adler from comment #7) > Comment on attachment 388506 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=388506&action=review > > >>> Source/WTF/wtf/Compiler.h:207 > >>> +#if COMPILER(GCC) || (COMPILER(CLANG) && __has_attribute(fallthrough)) > >> > >> Why doesn’t the section above with __has_cpp_attribute work? I believe that’s what’s supposed to cover this. > > > > Oh, non-C++, I see > > Since all the versions of CLANG we compile with have this support, I suggest > just writing: > > #if COMPILE(GCC_COMPATIBLE) In my testing, I found this wasn't always true, so I'd prefer to leave the `__has_attribute` check. Thanks for the review, will sort out what's going on with Windows before landing.
Conrad Shultz
Comment 9 2020-01-28 13:53:46 PST
Conrad Shultz
Comment 10 2020-01-30 11:55:53 PST
WebKit Commit Bot
Comment 11 2020-01-30 16:15:17 PST
The commit-queue encountered the following flaky tests while processing attachment 389274 [details]: editing/spelling/spellcheck-async-remove-frame.html bug 158401 (authors: morrita@google.com, rniwa@webkit.org, and tony@chromium.org) The commit-queue is continuing to process your patch.
WebKit Commit Bot
Comment 12 2020-01-30 16:15:53 PST
Comment on attachment 389274 [details] Patch Clearing flags on attachment: 389274 Committed r255467: <https://trac.webkit.org/changeset/255467>
WebKit Commit Bot
Comment 13 2020-01-30 16:15:55 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.