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