On Aug 25, 2013, at 11:29 AM, Richard Sandiford <rdsandif...@googlemail.com> 
wrote:
> Mike Stump <mikest...@comcast.net> writes:
>> On Aug 23, 2013, at 8:02 AM, Richard Sandiford
>> <rdsandif...@googlemail.com> wrote:
>>> We really need to get rid of the #include "tm.h" in wide-int.h.
>>> MAX_BITSIZE_MODE_ANY_INT should be the only partially-target-dependent
>>> thing in there.  If that comes from tm.h then perhaps we should put it
>>> into a new header file instead.
>> 
>> BITS_PER_UNIT comes from there as well, and I'd need both.  Grabbing the
>> #defines we generate is easy enough, but BITS_PER_UNIT would be more
>> annoying.  No port in the tree makes use of it yet (other than 8).  So,
>> do we just assume BITS_PER_UNIT is 8?
> 
> Looks like wide-int is just using BITS_PER_UNIT to get the number of
> bits in "char".  That's a host thing, so it should be CHAR_BIT instead.

?  What?  No.  BITS_PER_UNIT is a feature of the target machine, so, it is 
absolutely wrong to use a property of the host machine or the build machine.  
We don't use sizeof(int) to set the size of int on the target for the example 
same reason.

Reply via email to