Bug 127647 - JavaScriptCore: Enable -Wimplicit-fallthrough and add FALLTHROUGH annotation where needed
Summary: JavaScriptCore: Enable -Wimplicit-fallthrough and add FALLTHROUGH annotation ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-26 01:11 PST by Joseph Pecoraro
Modified: 2014-01-27 20:01 PST (History)
3 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (17.19 KB, patch)
2014-01-26 01:14 PST, Joseph Pecoraro
no flags Details | Formatted Diff | Diff
[PATCH] Proposed Fix (18.38 KB, patch)
2014-01-26 02:42 PST, Joseph Pecoraro
andersca: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2014-01-26 01:11:36 PST
This should go through a careful review. I don't think anything is controversial here.

I can already see that engineers might want to include a comment with a FALLTHROUGH.

For example:

    // fall through to Foo

Could become:

    FALLTHROUGH; // To Foo.

In the first patch I only left comments that seemed most apt to keep.

Also filed a clang issue to make FALLTHROUGH nicer to use in the case and there are labels preceding the next case:
http://llvm.org/bugs/show_bug.cgi?id=18621
Comment 1 Joseph Pecoraro 2014-01-26 01:14:14 PST
Created attachment 222265 [details]
[PATCH] Proposed Fix

Again, reviewers look carefully. This may have uncovered a latent bug with an accidental fallthrough.
Comment 2 Joseph Pecoraro 2014-01-26 02:42:14 PST
Created attachment 222268 [details]
[PATCH] Proposed Fix
Comment 3 Joseph Pecoraro 2014-01-27 20:01:13 PST
Landed <http://trac.webkit.org/changeset/162906>.