[Webkit-unassigned] [Bug 127637] New: Add FALLTHROUGH and -Wimplicit-fallthrough to warn about unannotated implicit fallthroughs in switches
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat Jan 25 17:25:54 PST 2014
https://bugs.webkit.org/show_bug.cgi?id=127637
Summary: Add FALLTHROUGH and -Wimplicit-fallthrough to warn
about unannotated implicit fallthroughs in switches
Product: WebKit
Version: 528+ (Nightly build)
Platform: Unspecified
OS/Version: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: Web Template Framework
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: joepeck at webkit.org
CC: andersca at apple.com, sam at webkit.org
clang has -Wimplicit-fallthrough and [[clang::fallthrough]]. Lets use them!
<http://clang.llvm.org/docs/LanguageExtensions.html#the-clang-fallthrough-attribute>
The clang::fallthrough attribute is used along with the -Wimplicit-fallthrough argument to annotate intentional fall-through between switch labels. It can only be applied to a null statement placed at a point of execution between any statement and the next switch label. It is common to mark these places with a specific comment, but this attribute is meant to replace comments with a more strict annotation, which can be checked by the compiler. This attribute doesn’t change semantics of the code and can be used wherever an intended fall-through occurs. It is designed to mimic control-flow statements like break;, so it can be placed in most places where break; can, but only if there are no statements on the execution path between it and the next switch label.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list