Bug 255915 - REGRESSION(263331@main): [GTK] MiniBrowser cannot be built with clang due to fallthrough attribute
Summary: REGRESSION(263331@main): [GTK] MiniBrowser cannot be built with clang due to ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Adrian Perez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-04-25 01:45 PDT by Adrian Perez
Modified: 2023-04-25 03:14 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Perez 2023-04-25 01:45:22 PDT
The error:

  ../Tools/MiniBrowser/gtk/main.c:288:13: error: expected expression
              [[fallthrough]];
              ^
  ../Tools/MiniBrowser/gtk/main.c:291:13: error: expected expression
              [[fallthrough]];
              ^

We should probably use __attribute__((fallthrough)) instead because the MiniBrowser
is C code, not C++. Likely GCC just goes ahead and recognizes [[fallthrough]] also
while parsing C these days.
Comment 1 Adrian Perez 2023-04-25 01:50:58 PDT
Actually, we have a FALLTHROUGH macro already in wtf/Compiler.h,
but of course the MiniBrowser should only use public API :-)
Comment 2 Adrian Perez 2023-04-25 02:09:53 PDT
Pull request: https://github.com/WebKit/WebKit/pull/13139
Comment 3 EWS 2023-04-25 03:13:44 PDT
Committed 263358@main (db5885088422): <https://commits.webkit.org/263358@main>

Reviewed commits have been landed. Closing PR #13139 and removing active labels.
Comment 4 Radar WebKit Bug Importer 2023-04-25 03:14:18 PDT
<rdar://problem/108496085>