[issue1621] Do not assume signed integer overflow behavior

Christian Heimes report at bugs.python.org
Sun Jan 20 14:56:10 CET 2008


Christian Heimes added the comment:

Ismail Donmez wrote:
> Final patch should be complete. Used a trick in _sre.c, instead of i < 0
> , I used 
> i + i < i to trick gcc.
> 
> Added file: http://bugs.python.org/file9242/fix-overflows-final.patch

Does the C89 standard allow this code?

int q = 1;
int p = (unsigned)q;

I've never seen an unsigned cast without a type. Does the code compile
with gcc -std=C89?

Christian

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1621>
__________________________________


More information about the Python-bugs-list mailing list