Patch: Add __restrict to string.h

Eric Blake eblake@redhat.com
Thu Jul 18 22:45:00 GMT 2013


On 07/18/2013 04:39 PM, Eric Blake wrote:
> On 07/18/2013 11:46 AM, Joel Sherrill wrote:
>> Hi
>>
>> Attached is the first attempt at a patch to add __restrict
>> to prototypes per Single UNIX Specification V4.
>>
> 
>>
>> Question: Prototypes in the documentation say __restrict.
>> Is this OK?
> 
> I'd prefer to see plain 'restrict' in the docs - that is, write the docs
> assuming the user has a compliant compiler.

In fact, looking at just your patch to memccpy, I like that you added
restrict to the ANSI_SYNOPSIS section, while leaving the TRAD_SYNOPSIS
unchanged (since we KNOW that anyone relying on K&R doesn't have
restrict, and that __restrict is elided on such a setup).

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://sourceware.org/pipermail/newlib/attachments/20130718/4ee01d83/attachment.sig>


More information about the Newlib mailing list