Author gvanrossum
Recipients cartman, gvanrossum, loewis
Date 2007-12-13.19:16:37
SpamBayes Score 0.00427966
Marked as misclassified No
Message-id <ca471dc20712131116g55920ad1o2e143f54bca319a5@mail.gmail.com>
In-reply-to <1197573007.63.0.516495308629.issue1608@psf.upfronthosting.co.za>
Content
> 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.)
History
Date User Action Args
2007-12-13 19:16:37gvanrossumsetspambayes_score: 0.00427966 -> 0.00427966
recipients: + gvanrossum, loewis, cartman
2007-12-13 19:16:37gvanrossumlinkissue1608 messages
2007-12-13 19:16:37gvanrossumcreate