This is the mail archive of the
mailing list for the GCC project.
Re: [patch] Do not generate useless integral conversions
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 24 Jun 2014 16:32:27 +0200
- Subject: Re: [patch] Do not generate useless integral conversions
- Authentication-results: sourceware.org; auth=none
- References: <1546601 dot hgDYK4VNce at polaris>
On Tue, Jun 24, 2014 at 12:54 PM, Eric Botcazou <firstname.lastname@example.org> wrote:
> https://gcc.gnu.org/ml/gcc-patches/2012-03/msg00491.html changed the old
> signed_type_for/unsigned_type_for functions and made them always return an
> integer type, whereas they would previously leave integral types unchanged.
> I don't see any justification for the latter and this has the annoying effect
> of generating useless integral conversions in convert.c, for example between
> boolean types and integer types of the same precision.
> The attached patch restores the old behavior for them. Bootstrapped/regtested
> on x86_64-suse-linux, OK for the mainline?
I think that was on purpose to avoid arithmetics in enum types. As those
conversions are useless and thus stripped later is it really important
to retain enum and boolean kind here?
> 2014-06-24 Eric Botcazou <email@example.com>
> * tree.c (signed_or_unsigned_type_for): Treat integral types equally.
> Eric Botcazou