Guido van Rossum added the comment:

> if you can give me a sample testcase I can bug GCC developers, this
> doesn't look good from GCC side at all. Btw from my limited C knowledge
> marking variables would volatile would prevent optimizations of them.

The example would be something like

void foo(ssize_t x)
{
  if (x >= 0) {
    if (x+x < 0) printf("Overflow\n");
  }
}

main()
{
  foo(2147483647);
}

This should print "Overflow" but won't if the evil optimization
triggers. (However you may have to tweak the example program so the
compiler can't inline the argument to foo.)

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1608>
__________________________________
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to