This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: VRP: allow unsigned truncating conversions that will fit




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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]