[Bug middle-end/48580] missed optimization: integer overflow checks

noloader at gmail dot com gcc-bugzilla@gcc.gnu.org
Sat Feb 2 17:02:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48580

--- Comment #16 from Jeffrey Walton <noloader at gmail dot com> 2013-02-02 17:01:55 UTC ---
(In reply to comment #15)
> I agree. The main point of all of this is optimization. And in terms of
> optimization, one would want to examine some flag immediately after an
> operation setting that flag. One would act upon the flag, and then discard it.
I somewhat disagree. A program must be correct; it should be secure; and it can
be efficient.

I'm interested in "correct" and "secure". If a program silently overflows, its
surely not correct. If an adversary can do something with the errant result,
its not secure either.

What's the point in doing something wrong but doing it quickly?

Jeff



More information about the Gcc-bugs mailing list