This is the mail archive of the gcc@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: memset and host char requirement


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




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