Re: [Python-Dev] gcc 4.2 exposes signed integer overflows

2006-08-26 Thread Tim Peters
[David Hopwood] > (CPython has probably only been tested on 2's complement systems anyway, Definitely so. Are there any boxes using 1's-comp or sign-magnitude integers anymore? Python assumes 2's-comp in many places. > but if we're going to be pedantic about depending only on things in the > C

Re: [Python-Dev] gcc 4.2 exposes signed integer overflows

2006-08-26 Thread David Hopwood
Thomas Wouters wrote: > On 8/26/06, David Hopwood <[EMAIL PROTECTED]> wrote: > >> CPython should be fixed anyway. The correct fix is >> "if (y == -1 && x < 0 && (unsigned long)x == -(unsigned long)x)". > > Why not just "... && x == LONG_MIN"? Because the intent is to check that x / y does not ov

Re: [Python-Dev] gcc 4.2 exposes signed integer overflows

2006-08-26 Thread Tim Peters
[David Hopwood] >> CPython should be fixed anyway. The correct fix is >> "if (y == -1 && x < 0 && (unsigned long)x == -(unsigned long)x)". Note that this was already suggested in the bug report. [Thomas Wouters] > Why not just "... && x == LONG_MIN"? In full, if (y == -1 && x == LONG_MIN)

Re: [Python-Dev] gcc 4.2 exposes signed integer overflows

2006-08-26 Thread Daniel Berlin
Jack Howarth wrote: > Guido, > You'll never win that argument with the gcc developers. If you > rely on undefined behavior in the c language standard, they have > in the past, and will continue to, feel free to ignore those cases. > If you plan on ignoring this issue, just be prepared to see a

Re: [Python-Dev] gcc 4.2 exposes signed integer overflows

2006-08-26 Thread Thomas Wouters
On 8/26/06, David Hopwood <[EMAIL PROTECTED]> wrote: CPython should be fixed anyway. The correct fix is"if (y == -1 && x < 0 && (unsigned long)x == -(unsigned long)x)".Why not just "... && x == LONG_MIN"? -- Thomas Wouters <[EMAIL PROTECTED]>Hi! I'm a .signature virus! copy me into your .signature

Re: [Python-Dev] gcc 4.2 exposes signed integer overflows

2006-08-26 Thread David Hopwood
Guido van Rossum wrote: > On 8/26/06, Jack Howarth <[EMAIL PROTECTED]> wrote: > >> I discovered that gcc 4.2 exposes a flaw with >>signed integer overflows in python. This bug and the >>necessary fix has been discussed in detail on the gcc >>mailing list. I have filed a detailed bug report a

Re: [Python-Dev] gcc 4.2 exposes signed integer overflows

2006-08-26 Thread Jack Howarth
Guido, You'll never win that argument with the gcc developers. If you rely on undefined behavior in the c language standard, they have in the past, and will continue to, feel free to ignore those cases. If you plan on ignoring this issue, just be prepared to see a testcase failure in the pytho

Re: [Python-Dev] gcc 4.2 exposes signed integer overflows

2006-08-26 Thread Guido van Rossum
On 8/26/06, Jack Howarth <[EMAIL PROTECTED]> wrote: >I discovered that gcc 4.2 exposes a flaw with > signed integer overflows in python. This bug and the > necessary fix has been discussed in detail on the gcc > mailing list. I have filed a detailed bug report and > the recommended patch pr

[Python-Dev] gcc 4.2 exposes signed integer overflows

2006-08-26 Thread Jack Howarth
I discovered that gcc 4.2 exposes a flaw with signed integer overflows in python. This bug and the necessary fix has been discussed in detail on the gcc mailing list. I have filed a detailed bug report and the recommended patch proposed by the gcc developers. This problem should be addressed

Re: [Python-Dev] Removing anachronisms from logging module

2006-08-26 Thread A.M. Kuchling
On Fri, Aug 25, 2006 at 10:44:53AM -0700, Guido van Rossum wrote: > any more; neither does Vinay. I propose as a project for someone to > clean it up ... There's a list of simple tasks in the wiki at . --amk ___ P