This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: VRP: allow unsigned truncating conversions that will fit
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 14 Sep 2018 07:05:19 -0400
- Subject: Re: VRP: allow unsigned truncating conversions that will fit
- References: <db121669-f55d-749d-2337-7827d1e82338@redhat.com>
On 09/14/2018 06:42 AM, Aldy Hernandez wrote:
I'm still thinking about this one...
Is there a subtle reason why we're avoiding unsigned truncating
conversions of the form:
[X, +INF]
If the X fits in the new type, why can't we just build [X, +INF] in the
new type? See attached patch.
For that matter, the new type doesn't even have to be unsigned, as long
as the old type is unsigned.
[25, +INF] can happily convert from long long unsigned to signed char.
If there isn't, OK for trunk?