memset and host char requirement

Paulo J. Matos paulo@matos-sorge.com
Thu Jul 26 12:33:00 GMT 2012


On 26/07/12 13:27, Richard Guenther wrote:
>> Why would the fill value in a memset call be required to fit in a host char?
>
> Obviously because of the implementation detail of its caller.
>
> Richard.
>

Richard, I am sorry if I was not more clear. I understand that this is 
required because the caller uses a pointer to a char to pass the value 
of the fill, therefore the fill must fill in a host char. But is there 
any reason to introduce this constraint?

Wouldn't it be more flexible, albeit probably more complex, to pass the 
value through a TARGET char or a HOST type as big as a TARGET char?

Cheers,
-- 
PMatos





More information about the Gcc mailing list