This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Constant fold -A - B as -B - A
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- To: Roger Sayle <roger at www dot eyesopen dot com>
- Cc: <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 15 Jan 2003 17:47:05 +0000 (GMT)
- Subject: Re: [PATCH] Constant fold -A - B as -B - A
On Wed, 15 Jan 2003, Roger Sayle wrote:
> Hopefully, the code that believes that signed integer addition is
> undefined and takes advantage of it is confined to the language
> front-ends. I believe GCC supports languages that define (or
> expect) the behaviour of signed integer overflow.
It should be in the front ends, but it isn't (e.g. loop.c). In previous
discussions of GIMPLE etc. I've noted that a desirable characteristic of
language-independent representations would be for this sort of thing to be
represented explicitly.
--
Joseph S. Myers
jsm28@cam.ac.uk