This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/48580] missed optimization: integer overflow checks
- From: "joseph at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 05 Oct 2011 15:19:01 +0000
- Subject: [Bug middle-end/48580] missed optimization: integer overflow checks
- Auto-submitted: auto-generated
- References: <bug-48580-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48580
--- Comment #14 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2011-10-05 15:19:01 UTC ---
On Wed, 5 Oct 2011, jules at gcc dot gnu.org wrote:
> I don't much like the idea of using builtins for operations as fundamental as
> integer arithmetic. How about this as a straw-man suggestion: adding new
> qualifiers for "fat" integers-with-flags, somewhat in the spirit of the
> embedded-C fractional/saturating types? So you might have:
The trouble is that the nature of an operation is more a property of the
operation than of the type - and the proliferation of types for what
should be operations on normal types is much of the problem with what the
embedded-C TR does. You could have pragmas to say that a cumulative flag
for a particular scope goes in a particular variable, and that normal
operations have particular overflow semantics in that scope, maybe.