(no title)
flatfinger | 5 years ago
This, if one did:
char *strchr2(char return *restrict src, char target)
{
while(*src)
{
if (*src == target) return src;
src++;
}
}
then one version of the function could support both const and non-const usage.
BTW, I'd also like to see "register" and "return register" be usable as a qualifiers for pointer-type function parameters which would promise that the passed in pointer wouldn't "escape", or else that it could only escape through the return value (so a compiler that could see everything done with the return value wouldn't have to worry about the argument escaping).
No comments yet.