[issue10052] Python/dtoa.c:158: #error "Failed to find an exact-width 32-bit integer type" (FreeBSD 4.11 + gcc 2.95.4)

Mark Dickinson report at bugs.python.org
Sun Nov 7 14:08:20 CET 2010


Mark Dickinson <dickinsm at gmail.com> added the comment:

Thanks for the patch.  This looks fine, in principle.

A couple of comments and questions:

(1) I think the patch should provide *MIN values alongside the *MAX values (for signed types only, of course).

(2) Are we sure that these values are valid on all FreeBSD 4 platforms, or should these definitions be further restricted to Free BSD 4 / x86?

(3) Are the types of the constants definitely correct?  E.g., UINT64_MAX should have type uint64_t.  That gets a bit tricky, since we can't use casts (which would prevent these constants being used in preprocessor #ifs), so we need to determine exactly what basic types uint32_t and uint64_t match, and make sure to use the correct suffix (e.g., ULL, LL, UL, L).  For uint32_t I guess this is easy:  it'll almost certainly be the same type as unsigned int.  Is uint64_t defined as unsigned long long, or as unsigned long?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10052>
_______________________________________


More information about the Python-bugs-list mailing list