Jordan Abel said:
[snip]
It's reserved for the library. Freestanding implementations provide
only a very restricted subset of the library, which does not include
either of the headers these are reserved for. Many of the
requirements in the standard implicitly only apply to hosted
implementations, and it's reasonable to suppose that the 'reserved
as external identifiers in all contexts' for functions which can
only appear in two headers that are not present on freestanding
implementations is one of those, given that it is a library issue.
It's an interesting question. I *think* that names starting with
"str" are reserved for use as identifiers with external linkage on
both hosted and freestanding implementations.
C99 7.1.3 says:
If the program declares or defines an identifier in a context in
which it is reserved (other than as allowed by 7.1.4), or defines
a reserved identifier as a macro name, the behavior is undefined.
so a program that uses "strccnt" as an identifier with external linkage
cannot be strictly conforming.
C99 4p6 says:
A _conforming freestanding implementation_ shall accept any
strictly conforming program that does not use complex types and in
which the use of the features specified in the library clause
(clause 7) is confined to the contents of the standard headers
<float.h>, <iso646.h>, <limits.h>, <stdarg.h>, <stdbool.h>,
<stddef.h>, and <stdint.h>. A conforming implementation may have
extensions (including additional library functions), provided they
do not alter the behavior of any strictly conforming program.
Since parts of clause 7 do apply to freestanding implementations, it's
reasonable to assume that 7.1.3, which is part of the introduction
applies to freestanding implementations.
Note that, as far as I can tell, a conforming hosted implementation
also qualifies as a conforming freestanding implementation, and
freestanding implementations can provide subsets of the standard
library. It seems reasonable to avoid using reserved identifiers
anyway.
(Of course, this is a fairly minor technical dispute on which people
can reasonable disagree; pete, you're taking this way too personally.)