This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Document arithmetic overflow semantics
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: roger at www dot eyesopen dot com
- Cc: gcc-patches at gcc dot gnu dot org, gcc at gcc dot gnu dot org
- Date: Thu, 13 Feb 03 11:16:03 EST
- Subject: Re: [PATCH] Document arithmetic overflow semantics
At the GCC internal level there should be no such thing as undefined
behaviour, this is a front-end concept.
I disagree. As I said, it's quite valuable to be able to know that we
don't care, for optimization purposes, if an overflow has or has
As for trap on overflow, that is currently supported and honored in
the middle-end, by flag_trapv and flag_non_call_exceptions.
I'm talking about *per expression*.
You may have noticed that my original patch, was a simple
documentation patch that just described what GCC currently does, and
what is assumed at several points in the code.
Nope. Lots of places in the optimizer assume that overflow signed
integers are undefined. Your proposed documentation doesn't mention that.