Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.std.c > #6114

Re: Making more of the C standard library mandatory for freestanding implementations

From Philipp Klaus Krause <pkk@spth.de>
Newsgroups comp.std.c
Subject Re: Making more of the C standard library mandatory for freestanding implementations
Date 2020-05-08 21:27 +0200
Organization solani.org
Message-ID <r94brm$cj2$1@solani.org> (permalink)
References <r8uo2j$4l2$1@solani.org> <86k11nzy2f.fsf@linuxsc.com> <r91o2q$djg$1@solani.org> <867dxmz1tt.fsf@linuxsc.com>

Show all headers | View raw


Am 08.05.20 um 21:03 schrieb Tim Rentsch:
> Philipp Klaus Krause <pkk@spth.de> writes:
> 
>> Am 07.05.20 um 15:14 schrieb Tim Rentsch:
>>
>>> Freestanding implementations may provide whatever additional
>>> library facilities they choose, but the required set should
>>> be kept where it is, at an absolute minimum.
>>
>> Why?
> 
> I would turn that question around and ask why should the minimum
> be raised?  Your written proposal doesn't offer even any good
> arguments, let alone any compelling or convincing ones.
> 
> […]
> 
> The idea that <string.h> should be mandatory everywhere is part of
> a broader trend that C should be made more uniform by insisting
> that implementations be more homogenous.  A justification sometimes
> offered for this is so programs will be "more portable" (and indeed
> this aspect is mentioned in your proposal).  That reasoning is
> fundamentally misguided.  C isn't like Ada, where its use can be
> mandated, and certification is necessary.  If the bar is raised,
> the "offending implementations" won't change, they will just be
> left as non-conforming.  That effect will /reduce/ the incentive to
> comply with the rest of the Standard, not raise it.  Fundamental
> truth:  programs are not made "more portable" by limiting the set
> of platforms (HW+SW) that have conforming implementations.
> Applications don't have to support every possible conforming
> implementation;  they are perfectly free to rule out any that don't
> give them what they need (ideally with preprocessor conditionals or
> static assertions, but that is a separate topic).  But thinking a
> program is "more portable" by virtue of having ruled out all
> implementations where it wouldn't work is like an ostrich sticking
> its head in the sand.

Functionality in the C standard is there, since it was found useful to
many C programmers - otherwise it wouldn't have made it into the standard.
I propose making some functionality that is already in the C standard
mandatory for freestanding implementations.
And indeed, I see uses of string.h functions in many programs for tiny
devices.
Sometimes, to be portable cross freestanding implementations, users roll
their own versions.

I do not see adding functionality, that can be easily added to any C
implementation as reducing the incentive to comply with the standard. On
the other hand, that would surely be true for features that are complex
to implement or hard to implement efficiently on some hardware (SDCC
does not support VLAs, and thus is more complete in C17 support than in
C99 support).

Back to comp.std.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Making more of the C standard library mandatory for freestanding implementations Philipp Klaus Krause <pkk@spth.de> - 2020-05-06 18:19 +0200
  Re: Making more of the C standard library mandatory for freestanding implementations Grant Edwards <invalid@invalid.invalid> - 2020-05-06 16:47 +0000
    Re: Making more of the C standard library mandatory for freestanding implementations Philipp Klaus Krause <pkk@spth.de> - 2020-05-06 19:16 +0200
      Re: Making more of the C standard library mandatory for freestanding implementations Grant Edwards <invalid@invalid.invalid> - 2020-05-06 18:10 +0000
        Re: Making more of the C standard library mandatory for freestanding implementations James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-05-06 15:10 -0400
          Re: Making more of the C standard library mandatory for freestanding implementations Richard Damon <Richard@Damon-Family.org> - 2020-05-06 16:08 -0400
            Re: Making more of the C standard library mandatory for freestanding implementations Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-05-06 13:22 -0700
              Re: Making more of the C standard library mandatory for freestanding implementations Richard Damon <Richard@Damon-Family.org> - 2020-05-06 22:29 -0400
                Re: Making more of the C standard library mandatory for freestanding implementations David Brown <david.brown@hesbynett.no> - 2020-05-07 15:43 +0200
              Re: Making more of the C standard library mandatory for freestanding implementations Tim Rentsch <tr.17687@z991.linuxsc.com> - 2020-05-07 06:08 -0700
            Re: Making more of the C standard library mandatory for freestanding implementations Philipp Klaus Krause <pkk@spth.de> - 2020-05-06 22:36 +0200
              Re: Making more of the C standard library mandatory for freestanding implementations Grant Edwards <invalid@invalid.invalid> - 2020-05-06 20:57 +0000
              Re: Making more of the C standard library mandatory for freestanding implementations Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2020-05-06 23:25 +0200
                Re: Making more of the C standard library mandatory for freestanding implementations Grant Edwards <invalid@invalid.invalid> - 2020-05-06 21:34 +0000
                Re: Making more of the C standard library mandatory for freestanding implementations Philipp Klaus Krause <pkk@spth.de> - 2020-05-07 10:17 +0200
                Re: Making more of the C standard library mandatory for freestanding implementations Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2020-05-07 18:45 +0300
                Re: Making more of the C standard library mandatory for freestanding implementations Philipp Klaus Krause <pkk@spth.de> - 2020-05-07 10:16 +0200
                Re: Making more of the C standard library mandatory for freestanding implementations Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2020-05-07 21:39 +0200
                Re: Making more of the C standard library mandatory for freestanding implementations Philipp Klaus Krause <pkk@spth.de> - 2020-05-07 21:44 +0200
                Re: Making more of the C standard library mandatory for freestanding implementations Paul Rubin <no.email@nospam.invalid> - 2020-05-07 12:54 -0700
                Re: Making more of the C standard library mandatory for freestanding implementations Tim Rentsch <tr.17687@z991.linuxsc.com> - 2020-05-08 08:38 -0700
                Re: Making more of the C standard library mandatory for freestanding implementations Philipp Klaus Krause <pkk@spth.de> - 2020-05-08 21:30 +0200
                Re: Making more of the C standard library mandatory for freestanding implementations Tim Rentsch <tr.17687@z991.linuxsc.com> - 2020-05-30 02:04 -0700
                Re: Making more of the C standard library mandatory for freestanding implementations Philipp Klaus Krause <pkk@spth.de> - 2020-08-04 10:58 +0200
                Re: Making more of the C standard library mandatory for freestanding implementations Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-08-04 07:35 -0700
          Re: Making more of the C standard library mandatory for freestanding implementations Philipp Klaus Krause <pkk@spth.de> - 2020-05-06 22:34 +0200
            Re: Making more of the C standard library mandatory for freestanding implementations upsidedown@downunder.com - 2020-05-07 09:13 +0300
            Re: Making more of the C standard library mandatory for freestanding implementations Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2020-05-07 18:47 +0300
              Re: Making more of the C standard library mandatory for freestanding implementations Grant Edwards <invalid@invalid.invalid> - 2020-05-07 15:51 +0000
                Re: Making more of the C standard library mandatory for freestanding implementations Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2020-05-08 10:09 +0300
    Re: Making more of the C standard library mandatory for freestanding implementations Florian Weimer <fw@deneb.enyo.de> - 2020-05-08 18:48 +0200
      Re: Making more of the C standard library mandatory for freestanding implementations Andrew Smallshaw <andrews@sdf.org> - 2020-05-08 17:01 +0000
        Re: Making more of the C standard library mandatory for freestanding implementations Philipp Klaus Krause <pkk@spth.de> - 2020-05-08 20:05 +0200
  Re: Making more of the C standard library mandatory for freestanding implementations upsidedown@downunder.com - 2020-05-07 08:59 +0300
  Re: Making more of the C standard library mandatory for freestanding implementations Tim Rentsch <tr.17687@z991.linuxsc.com> - 2020-05-07 06:14 -0700
    Re: Making more of the C standard library mandatory for freestanding implementations Philipp Klaus Krause <pkk@spth.de> - 2020-05-07 21:38 +0200
      Re: Making more of the C standard library mandatory for freestanding implementations Tim Rentsch <tr.17687@z991.linuxsc.com> - 2020-05-08 12:03 -0700
        Re: Making more of the C standard library mandatory for freestanding implementations Philipp Klaus Krause <pkk@spth.de> - 2020-05-08 21:15 +0200
        Re: Making more of the C standard library mandatory for freestanding implementations Philipp Klaus Krause <pkk@spth.de> - 2020-05-08 21:27 +0200
          Re: Making more of the C standard library mandatory for freestanding implementations Jakob Bohm <jb-usenet@wisemo.com.invalid> - 2020-05-15 15:13 +0200
        Re: Making more of the C standard library mandatory for freestanding implementations David Brown <david.brown@hesbynett.no> - 2020-05-09 00:25 +0200

csiph-web