Static identifier => not reserved

C

candide

The standard says :

----------------------------- 8< ----------------------------------
7.1.3 Reserved identifiers
[...]
— 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 ?

For instance, is the following code valid

------------- 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 ---------------

?


Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,062
Latest member
OrderKetozenseACV

Latest Threads

Top