This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: SIMPLE: A language-independent tree IR
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- To: Florian Weimer <fw at deneb dot enyo dot de>
- Cc: Diego Novillo <dnovillo at redhat dot com>, <gcc at gcc dot gnu dot org>
- Date: Fri, 4 Jan 2002 11:28:32 +0000 (GMT)
- Subject: Re: SIMPLE: A language-independent tree IR
On Fri, 4 Jan 2002, Florian Weimer wrote:
> "Joseph S. Myers" <jsm28@cam.ac.uk> writes:
>
> > There may be other C assumptions in the current tree forms to consider and
> > maybe change - for example, are the C rules that overflow of signed
> > integer arithmetic is undefined appropriate for all languages,
>
> I thought that in the GCC context, integer overflow has a defined
> meaning (which is not documented in the ISO standard, though). In
> fact, I'm quite sure that tons of code will break if GCC behavior in
> this regard changes only slightly.
In the GCC context, signed integer overflow is undefined - and there are
optimisations that use this. (I don't know where they all are, though
comments such as
/* If EXP is signed, any overflow in the computation is undefined,
so we don't worry about it [...]
in fold-const.c are probably relevant, and I've closed PRs that have
reported what appear to be such optimisations as bugs.)
--
Joseph S. Myers
jsm28@cam.ac.uk