This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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:16barrysetrecipients: + barry, serhiy.storchaka
2017-09-04 17:07:16barrysetmessageid: <1504544836.58.0.320936522732.issue31337@psf.upfronthosting.co.za>
2017-09-04 17:07:16barrylinkissue31337 messages
2017-09-04 17:07:16barrycreate