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


Groups > comp.std.c > #6075 > unrolled thread

Making more of the C standard library mandatory for freestanding implementations

Started byPhilipp Klaus Krause <pkk@spth.de>
First post2020-05-06 18:19 +0200
Last post2020-05-09 00:25 +0200
Articles 1 on this page of 41 — 14 participants

Back to article view | Back to comp.std.c


Contents

  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

Page 3 of 3 — ← Prev page 1 2 [3]


#6118

FromDavid Brown <david.brown@hesbynett.no>
Date2020-05-09 00:25 +0200
Message-ID<r94m8u$g6a$1@dont-email.me>
In reply to#6112
On 08/05/2020 21:03, Tim Rentsch wrote:
> 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.
> 
>> By the same argument you could make support for int or anything else
>> optional for freestanding implemnentations.
> 
> That's wrong.  The case for int is not at all the same argument.
> 
>     * Every program uses int.  Not every program uses any
>       <string.h> functions.

That is not the case for small embedded systems.  On 8-bit cpus, "int" 
is invariably 16-bit, and you will want to use int8_t and uint8_t as 
much as you can.  It's only going to be very small programs that don't 
use "int" (or other 16-bit types, like int16_t or uint16_t), but when 
you have a microcontroller from the bottom end of the list, all your 
programs are small.  (I have used an 8-bit cpu with no ram, 32 8-bit 
registers, and 1K of program space.  I programmed it in C with gcc, and 
I did not use "int".  It was probably the smallest real program I have 
written.)

> 
>     * Supporting int has no runtime footprint costs even on
>       pretty tiny processors.  Functions in <string.h> often do.
> 

For many small processors, supporting "int" involves a fair number of 
"language support library" routines, for handling multiplication, 
division, and shifts.

>     * Support for int on freestanding implementations is already
>       in the Standard.  The default position is always in favor
>       of the status quo.  Removing support for int would need at
>       the very least a compelling argument to do so;  leaving it
>       in needs no argument at all.  This situation is exactly
>       reversed for the <string.h> proposal.

Agreed.

> 
>> Stuff that cannot be implemented easily on certain hardware should
>> surely be optional (or even better, the standard should try to avoid
>> introducing features in a way that make them hard or inefficient to
>> implement on certain types of hardware).
> 
> Personally I think there are reasons to consider lowering the
> requirements on freestanding implementations for integer types
> wider than int, and perhaps make floating point optional entirely.
> But that is another conversation. 

There is no need.  People making and using compilers for such small 
systems have no qualms about non-conforming toolchains.  No one using an 
8-bit AVR is put off by a compiler having 32-bit "double", or not 
supporting "long long" (even if it supports most of the rest of C99). 
These things are already optional - because putting a "standards 
compliant" stamp on a toolchain is optional.

[toc] | [prev] | [standalone]


Page 3 of 3 — ← Prev page 1 2 [3]

Back to top | Article view | comp.std.c


csiph-web