-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
bpo-30923: Silence fall-through warnings included in -Wextra since gc… #3157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4154,6 +4154,7 @@ expr_constant(struct compiler *c, expr_ty e) | |
else if (o == Py_False) | ||
return 0; | ||
} | ||
/* fall through */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wouldn't be better to move this comment one line up, inside a block, and align it with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed, but gcc doesn't recognize that. It's pretty inflexible. |
||
default: | ||
return -1; | ||
} | ||
|
@@ -4446,13 +4447,13 @@ compiler_visit_expr(struct compiler *c, expr_ty e) | |
switch (e->v.Attribute.ctx) { | ||
case AugLoad: | ||
ADDOP(c, DUP_TOP); | ||
/* Fall through to load */ | ||
/* Fall through */ | ||
case Load: | ||
ADDOP_NAME(c, LOAD_ATTR, e->v.Attribute.attr, names); | ||
break; | ||
case AugStore: | ||
ADDOP(c, ROT_TWO); | ||
/* Fall through to save */ | ||
/* Fall through */ | ||
case Store: | ||
ADDOP_NAME(c, STORE_ATTR, e->v.Attribute.attr, names); | ||
break; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why existing comments are shortened?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gcc only recognizes "fall through" (and a couple of other versions), but not that comment with additional words.
I only changed comments that aren't recognized.