Message301225
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. |
|
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 | |
|