This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On 2006-12-31 10:08:32 -0500, Richard Kenner wrote:Well, that's not equivalent. For instance, MPFR has many conditions that evaluate to TRUE or FALSE on some/many implementations (mainly because the type sizes depend on the implementation), even without the assumption that an overflow cannot occur.Can you give an example of such a condition and show how an optimization that assumed overflows were undefined could break that code?
This won't break the code.
OK, so your answer to Richard is simply no, helping to confirm his pragmatic assertion that the code in GCC that assumes wrapping is in practice (if not in theory) safe from the optimization efforts in this area.
But I'm saying that if the compiler assumes wrapping, even in some particular cases (e.g. code that *looks like* "overflow check"), it could miss some potential optimizations. That is, it is not possible to avoid breaking overflow checks *and* optimizing everything else.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |