>7.1.3 Reserved identifiersNot if you include <string.h>, in which case the second paragraph
[...]
— All identifiers with external linkage in any of the following
subclauses (including the future library directions) are always reserved
for use as identifiers with external linkage.
— Each identifier with file scope listed in any of the following
subclauses (including the future library directions) is reserved for use
as a macro name and as an identifier with file scope in the same name
space if any of its associated headers is included.
----------------------------- >8 ----------------------------------
Does this mean I'm allowed to give a STATIC function a name starting
with the str prefix ?
above is an issue. Otherwise, it's OK.
>For instance, is the following code validIt's OK, but I think it would be less confusing if you named it
------------- 8< ---------------
#include <stdio.h>
static size_t strlen(const char *s)
{
/* My own strlen() code */
}
int main(void)
{
printf("%lu\n",(unsigned long)strlen("blahblah"));
return 0;
}
------------- >8 ---------------
?
something else.