memset and host char requirement
Andrew Haley
aph@redhat.com
Thu Jul 26 12:35:00 GMT 2012
On 07/26/2012 01:32 PM, Paulo J. Matos wrote:
> 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, 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?
Probably. I suspect a patch would be welcome.
Andrew.
More information about the Gcc
mailing list