Groups | Search | Server Info | Keyboard shortcuts | Login | Register


Groups > comp.lang.c > #392493

Re: "A diagram of C23 basic types"

From Tim Rentsch <tr.17687@z991.linuxsc.com>
Newsgroups comp.lang.c
Subject Re: "A diagram of C23 basic types"
Date 2025-04-14 01:24 -0700
Organization A noiseless patient Spider
Message-ID <86ikn79mlq.fsf@linuxsc.com> (permalink)
References (7 earlier) <86ecy2c5o4.fsf@linuxsc.com> <87mscprhhe.fsf@nosuchdomain.example.com> <20250409105549.000037dd@yahoo.com> <86semhawhs.fsf@linuxsc.com> <20250410115004.00005276@yahoo.com>

Show all headers | View raw


Michael S <already5chosen@yahoo.com> writes:

> On Wed, 09 Apr 2025 13:52:15 -0700
> Tim Rentsch <tr.17687@z991.linuxsc.com> wrote:
>
>> Michael S <already5chosen@yahoo.com> writes:

[...distinction between hosted implementions and
 freestanding implementations...]

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

I sort of agree with you (even if in practice it isn't hard to
avoid using identifiers like memcpy or size_t).  I was confused
because this problem doesn't have much to do with whether an
implementation is freestanding or not.  There are different kinds
of identifiers, and the different kinds have different properties
about where they may or may not be used.  Do you really have a
problem avoiding identifiers defined in this or that library
header, either for all headers or just those headers required for
freestanding implementations?

Back to comp.lang.c | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Re: "A diagram of C23 basic types" Philipp Klaus Krause <pkk@spth.de> - 2025-04-05 19:56 +0200
  Re: "A diagram of C23 basic types" bart <bc@freeuk.com> - 2025-04-08 14:32 +0100
    Re: "A diagram of C23 basic types" David Brown <david.brown@hesbynett.no> - 2025-04-08 16:57 +0200
      Re: "A diagram of C23 basic types" bart <bc@freeuk.com> - 2025-04-08 16:47 +0100
        Re: "A diagram of C23 basic types" scott@slp53.sl.home (Scott Lurndal) - 2025-04-08 16:08 +0000
          Re: "A diagram of C23 basic types" Tim Rentsch <tr.17687@z991.linuxsc.com> - 2025-04-08 11:05 -0700
        Re: "A diagram of C23 basic types" Michael S <already5chosen@yahoo.com> - 2025-04-09 11:20 +0300
          Re: "A diagram of C23 basic types" bart <bc@freeuk.com> - 2025-04-09 11:32 +0100
        Re: "A diagram of C23 basic types" Ike Naar <ike@sdf.org> - 2025-04-09 08:53 +0000
    Re: "A diagram of C23 basic types" Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-04-08 14:46 -0700
      Re: "A diagram of C23 basic types" bart <bc@freeuk.com> - 2025-04-08 23:34 +0100
        Re: "A diagram of C23 basic types" Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-04-08 17:33 -0700
        Re: "A diagram of C23 basic types" James Kuyper <jameskuyper@alumni.caltech.edu> - 2025-04-08 22:47 -0400
          Re: "A diagram of C23 basic types" Tim Rentsch <tr.17687@z991.linuxsc.com> - 2025-04-08 21:36 -0700
            Re: "A diagram of C23 basic types" Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-04-08 23:12 -0700
              Re: "A diagram of C23 basic types" Michael S <already5chosen@yahoo.com> - 2025-04-09 10:55 +0300
                Re: "A diagram of C23 basic types" Tim Rentsch <tr.17687@z991.linuxsc.com> - 2025-04-09 13:52 -0700
                Re: "A diagram of C23 basic types" Michael S <already5chosen@yahoo.com> - 2025-04-10 11:50 +0300
                Re: "A diagram of C23 basic types" James Kuyper <jameskuyper@alumni.caltech.edu> - 2025-04-11 12:27 -0400
                Re: "A diagram of C23 basic types" Tim Rentsch <tr.17687@z991.linuxsc.com> - 2025-04-14 01:24 -0700
                Re: "A diagram of C23 basic types" Michael S <already5chosen@yahoo.com> - 2025-04-14 12:55 +0300
          Re: "A diagram of C23 basic types" bart <bc@freeuk.com> - 2025-04-09 11:21 +0100
            Re: "A diagram of C23 basic types" Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-04-09 15:03 -0700
          Re: "A diagram of C23 basic types" Kaz Kylheku <643-408-1753@kylheku.com> - 2025-04-09 21:32 +0000
        Re: "A diagram of C23 basic types" "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-04-08 22:58 -0700
      Re: "A diagram of C23 basic types" Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-04-08 15:36 -0700

csiph-web