Message301225
| Author |
barry |
| Recipients |
barry, serhiy.storchaka |
| Date |
2017年09月04日.17:07:16 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1504544836.58.0.320936522732.issue31337@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
I'll preface that it's not a major issue that I feel *has* to be fixed, but given that assert *can* be compiled away, does it make sense to use abort() instead? E.g.
1 file changed, 2 insertions(+), 2 deletions(-)
Python/compile.c | 4 ++--
modified Python/compile.c
@@ -1350,8 +1350,8 @@ get_const_value(expr_ty e)
case NameConstant_kind:
return e->v.NameConstant.value;
default:
- assert(!is_const(e));
- return NULL;
+ /* We should never get here. */
+ abort();
}
}
This at least makes gcc happy and makes the intent clearer. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2017年09月04日 17:07:16 | barry | set | recipients:
+ barry, serhiy.storchaka |
| 2017年09月04日 17:07:16 | barry | set | messageid: <1504544836.58.0.320936522732.issue31337@psf.upfronthosting.co.za> |
| 2017年09月04日 17:07:16 | barry | link | issue31337 messages |
| 2017年09月04日 17:07:16 | barry | create |
|