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: Merge C++ conversion into trunk (5/6 - double_int rewrite)


On Wed, Aug 15, 2012 at 12:28:58PM +0200, Richard Guenther wrote:
> the function names make no sense - they should be talking about
> host-wide-ints, because that is what they are about.  Thus,
> 
>   /* Conversion functions.  */
> 
>   HOST_WIDE_INT to_signed_hwi () const;
>   unsigned HOST_WIDE_INT to_unsigned_hwi () const;
> 
>   /* Conversion query functions.  */
> 
>   bool fits_unsigned_hwi () const;
>   bool fits_signed_hwi () const;
>   bool fits_hwi (bool uns) const;

Wouldn't uhwi and shwi be better?  Both are already widely used within
gcc...

> Likewise for
> 
>   static double_int from_unsigned (unsigned HOST_WIDE_INT cst);
>   static double_int from_signed (HOST_WIDE_INT cst);
> 
> I'm going to install a patch, after testing, that adjusts the names accordingly.

	Jakub


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