Sujet : Re: "A diagram of C23 basic types"
De : jameskuyper (at) *nospam* alumni.caltech.edu (James Kuyper)
Groupes : comp.lang.cDate : 11. Apr 2025, 17:27:59
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vtbfuf$1tc7o$4@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12
User-Agent : Mozilla Thunderbird
On 4/10/25 04:50, Michael S wrote:
...
I merely wanted to say that it is pretty easy to write a legal, if not
necessarily sensible, code that uses variable named 'memcpy' and
function named 'size_t'. OTOH, you can't name you variable 'break' or
'continue'. Or even 'bool', if you happen to use C23 compiler.
Yes, the rules for reserved identifiers are different for the keywords
that are part of the language syntax, than for the identifiers that
identify parts of the standard library. Lots of other things are
different between them, too. However, they are still both parts of a
conforming implementation of C, one covered by clause 6, and the other
by clause 7.
Also, note that all identifiers from the standard library that have
external linkage are reserved for use as identifiers with external
linkage. memcpy has external linkage, so you cannot define such a
variable with external linkage. size_t is a typedef, which has no linkage.