WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
206637
`FALLTHROUGH` macro isn't properly defined when building Objective-C files using Clang
https://bugs.webkit.org/show_bug.cgi?id=206637
Summary
`FALLTHROUGH` macro isn't properly defined when building Objective-C files us...
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
Details
Formatted Diff
Diff
Patch
(1.30 KB, patch)
2020-01-28 13:53 PST
,
Conrad Shultz
no flags
Details
Formatted Diff
Diff
Patch
(1.46 KB, patch)
2020-01-30 11:55 PST
,
Conrad Shultz
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Conrad Shultz
Comment 1
2020-01-22 18:30:34 PST
<
rdar://problem/58807878
>
Radar WebKit Bug Importer
Comment 2
2020-01-22 18:30:49 PST
<
rdar://problem/58820324
>
Conrad Shultz
Comment 3
2020-01-22 18:32:16 PST
<
rdar://problem/58807878
>
Conrad Shultz
Comment 4
2020-01-22 18:36:36 PST
Created
attachment 388506
[details]
Patch
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
Created
attachment 389056
[details]
Patch
Conrad Shultz
Comment 10
2020-01-30 11:55:53 PST
Created
attachment 389274
[details]
Patch
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.
Top of Page
Format For Printing
XML
Clone This Bug