summaryrefslogtreecommitdiff
path: root/Documentation/process/deprecated.rst
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2019-08-21 13:35:16 +0200
committerLinus Walleij <linus.walleij@linaro.org>2019-08-21 13:35:16 +0200
commit880e4f93f94677dff02f795352ed4f069ee046b7 (patch)
tree339be7ef0256eb6586180f014a8bd8f2f3e7fa72 /Documentation/process/deprecated.rst
parent19d17d935b29f30510874fd34e93357eea0daba2 (diff)
parentd1abaeb3be7b5fa6d7a1fbbd2e14e3310005c4c1 (diff)
Merge tag 'v5.3-rc5' into devel
Linux 5.3-rc5
Diffstat (limited to 'Documentation/process/deprecated.rst')
-rw-r--r--Documentation/process/deprecated.rst14
1 files changed, 14 insertions, 0 deletions
diff --git a/Documentation/process/deprecated.rst b/Documentation/process/deprecated.rst
index 49e0f64a3427..053b24a6dd38 100644
--- a/Documentation/process/deprecated.rst
+++ b/Documentation/process/deprecated.rst
@@ -119,3 +119,17 @@ array may exceed the remaining memory in the stack segment. This could
lead to a crash, possible overwriting sensitive contents at the end of the
stack (when built without `CONFIG_THREAD_INFO_IN_TASK=y`), or overwriting
memory adjacent to the stack (when built without `CONFIG_VMAP_STACK=y`)
+
+Implicit switch case fall-through
+---------------------------------
+The C language allows switch cases to "fall through" when
+a "break" statement is missing at the end of a case. This,
+however, introduces ambiguity in the code, as it's not always
+clear if the missing break is intentional or a bug. As there
+have been a long list of flaws `due to missing "break" statements
+<https://cwe.mitre.org/data/definitions/484.html>`_, we no longer allow
+"implicit fall-through". In order to identify an intentional fall-through
+case, we have adopted the marking used by static analyzers: a comment
+saying `/* Fall through */`. Once the C++17 `__attribute__((fallthrough))`
+is more widely handled by C compilers, static analyzers, and IDEs, we can
+switch to using that instead.