Bug 173385 - Implement FALLTHROUGH macro for compilers other than Clang
Summary: Implement FALLTHROUGH macro for compilers other than Clang
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Konstantin Tokarev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-14 14:36 PDT by Konstantin Tokarev
Modified: 2017-06-15 09:14 PDT (History)
9 users (show)

See Also:


Attachments
Patch (2.22 KB, patch)
2017-06-14 14:39 PDT, Konstantin Tokarev
no flags Details | Formatted Diff | Diff
Patch (2.27 KB, patch)
2017-06-15 01:48 PDT, Konstantin Tokarev
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Konstantin Tokarev 2017-06-14 14:36:47 PDT
FALLTHROUGH should be able to use [[gnu::fallthrough]] attribute of GCC, and [[fallthrough]] from C++17, whichever is available.
Comment 1 Konstantin Tokarev 2017-06-14 14:39:11 PDT
Created attachment 312921 [details]
Patch
Comment 2 Build Bot 2017-06-14 14:40:22 PDT
Attachment 312921 [details] did not pass style-queue:


ERROR: Source/WTF/wtf/Compiler.h:208:  Extra space before [.  [whitespace/brackets] [5]
ERROR: Source/WTF/wtf/Compiler.h:212:  Extra space before [.  [whitespace/brackets] [5]
Total errors found: 2 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Michael Catanzaro 2017-06-14 20:28:11 PDT
Comment on attachment 312921 [details]
Patch

All the EWS bots are red, fix it please:

In file included from ../../Source/WTF/wtf/Platform.h:32:0,
                 from ../../Source/WTF/wtf/ExportMacros.h:32,
                 from ../../Source/JavaScriptCore/runtime/JSExportMacros.h:32,
                 from ../../Source/JavaScriptCore/config.h:26,
                 from /home/ews/ltilve-gtk-wk2-ews/WebKit/Source/JavaScriptCore/disassembler/udis86/udis86_decode.c:27:
../../Source/WTF/wtf/Compiler.h:209:32: error: missing ')' after "__has_attribute"
 #elif __has_cpp_attribute(clang::fallthrough)
                                ^
../../Source/WTF/wtf/Compiler.h:209:33: error:  ':' without preceding '?'
 #elif __has_cpp_attribute(clang::fallthrough)
                                 ^
../../Source/WTF/wtf/Compiler.h:211:30: error: missing ')' after "__has_attribute"
 #elif __has_cpp_attribute(gnu::fallthrough)
                              ^
../../Source/WTF/wtf/Compiler.h:211:31: error:  ':' without preceding '?'
 #elif __has_cpp_attribute(gnu::fallthrough)
                               ^
Comment 4 Konstantin Tokarev 2017-06-15 01:48:48 PDT
Created attachment 312960 [details]
Patch
Comment 5 Build Bot 2017-06-15 01:54:20 PDT
Attachment 312960 [details] did not pass style-queue:


ERROR: Source/WTF/wtf/Compiler.h:208:  Extra space before [.  [whitespace/brackets] [5]
ERROR: Source/WTF/wtf/Compiler.h:212:  Extra space before [.  [whitespace/brackets] [5]
Total errors found: 2 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 Konstantin Tokarev 2017-06-15 09:14:23 PDT
Comment on attachment 312960 [details]
Patch

Clearing flags on attachment: 312960

Committed r218333: <http://trac.webkit.org/changeset/218333>
Comment 7 Konstantin Tokarev 2017-06-15 09:14:28 PDT
All reviewed patches have been landed.  Closing bug.