Bug 255915

Summary: REGRESSION(263331@main): [GTK] MiniBrowser cannot be built with clang due to fallthrough attribute
Product: WebKit Reporter: Adrian Perez <aperez>
Component: Tools / TestsAssignee: Adrian Perez <aperez>
Status: RESOLVED FIXED    
Severity: Normal CC: bugs-noreply, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=255518

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>