Liste des Groupes | Revenir à cl c |
On Wed, 09 Apr 2025 13:52:15 -0700
Tim Rentsch <tr.17687@z991.linuxsc.com> wrote:
>Michael S <already5chosen@yahoo.com> writes:
>May be in some formal sense headers and library routines that are>
mandatory for freestanding implementations belong to the same rank
as core language. But in practice there exists an obvious
difference. In the first case, name clashes are avoidable
(sometimes with toothless threat that they can happen in the
future) and in the second case they are unavoidable.
It's hard for me to make sense sense of this comment. The only
library routines that are required in standard C are those
documented as part of a section for one of the standard headers.
For freestanding implementations in particular, there are only
two names (va_copy and va_end) that might correspond to library
functions, and if they do then the names are reserved for that
purpose. Do you mean to suggest that user code defining either
va_copy or va_end as a symbol with external linkage is
unavoidable? Any user code that does so could be summarily
rejected by the implementation. It's hard to imagine anyone
writing user code wanting to define either of those names as a
symbol with external linkage.
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.
Les messages affichés proviennent d'usenet.