Message301393
So with this diff:
modified Include/pymacro.h
@@ -95,4 +95,6 @@
#define Py_UNUSED(name) _unused_ ## name
#endif
+#define Py_UNREACHABLE() abort()
+
#endif /* Py_PYMACRO_H */
modified Python/compile.c
@@ -1350,8 +1350,7 @@ get_const_value(expr_ty e)
case NameConstant_kind:
return e->v.NameConstant.value;
default:
- assert(!is_const(e));
- return NULL;
+ Py_UNREACHABLE();
}
}
Neither gcc (macOS, Ubuntu), nor clang (Ubuntu) complain. |
|
Date |
User |
Action |
Args |
2017-09-05 23:02:19 | barry | set | recipients:
+ barry, rhettinger, pitrou, vstinner, skrah, serhiy.storchaka |
2017-09-05 23:02:19 | barry | set | messageid: <1504652539.42.0.440860676914.issue31338@psf.upfronthosting.co.za> |
2017-09-05 23:02:19 | barry | link | issue31338 messages |
2017-09-05 23:02:19 | barry | create | |
|