summaryrefslogtreecommitdiffstats
path: root/Python/ast.c
diff options
context:
space:
mode:
authorStefan Krah <skrah@bytereef.org>2017-08-21 11:09:59 (GMT)
committerGitHub <noreply@github.com>2017-08-21 11:09:59 (GMT)
commitf432a3234f9f2ee09bd40be03e06bf72865ee375 (patch)
treec3efacc3e10d4bb12216be2eafae64f144ecfb5e /Python/ast.c
parent0267128aa4dc7c383c341c19833c5d506eae9c93 (diff)
downloadcpython-f432a3234f9f2ee09bd40be03e06bf72865ee375.zip
cpython-f432a3234f9f2ee09bd40be03e06bf72865ee375.tar.gz
cpython-f432a3234f9f2ee09bd40be03e06bf72865ee375.tar.bz2
bpo-30923: Silence fall-through warnings included in -Wextra since gcc-7.0. (#3157)
Diffstat (limited to 'Python/ast.c')
-rw-r--r--Python/ast.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Python/ast.c b/Python/ast.c
index becf0ad..89206c3 100644
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -1182,6 +1182,7 @@ ast_for_comp_op(struct compiling *c, const node *n)
return In;
if (strcmp(STR(n), "is") == 0)
return Is;
+ /* fall through */
default:
PyErr_Format(PyExc_SystemError, "invalid comp_op: %s",
STR(n));
@@ -1196,6 +1197,7 @@ ast_for_comp_op(struct compiling *c, const node *n)
return NotIn;
if (strcmp(STR(CHILD(n, 0)), "is") == 0)
return IsNot;
+ /* fall through */
default:
PyErr_Format(PyExc_SystemError, "invalid comp_op: %s %s",
STR(CHILD(n, 0)), STR(CHILD(n, 1)));
@@ -3147,6 +3149,7 @@ ast_for_flow_stmt(struct compiling *c, const node *n)
}
return Raise(expression, cause, LINENO(n), n->n_col_offset, c->c_arena);
}
+ /* fall through */
default:
PyErr_Format(PyExc_SystemError,
"unexpected flow_stmt: %d", TYPE(ch));