This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR 61084: Use widest_int in sparc_fold_builtin
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 19 May 2014 08:27:14 +0100
- Subject: Re: PR 61084: Use widest_int in sparc_fold_builtin
- Authentication-results: sourceware.org; auth=none
- References: <87bnuyexv7 dot fsf at sandifor-thinkpad dot stglab dot manchester dot uk dot ibm dot com> <14901342 dot qKrUO6pI85 at polaris>
Eric Botcazou <ebotcazou@adacore.com> writes:
>> This is the second part of PR 61084, which it seems I'd forgotten to post.
>> pdist calculates a wide result from narrower inputs, so I should have
>> used widest_int rather than wide_int.
>
> Is that documented? Because, if even you wide-int guys got it wrong...
Well, I understood the distinction between wide_int and widest_int.
I just didn't understand what pdist did. :-)
The difference is documented (a bit verbosely) in wide-int.h.
Does anyone have any suggestions for a better name than "wide_int" though?
The main property of wide_int is that it has a variable precision, whereas
widest_int and offset_int have constant precisions.
Thanks,
Richard