Barry A. Warsaw added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue31337>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to