Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Paul Rubin Newsgroups: comp.std.c,comp.arch.embedded Subject: Re: Making more of the C standard library mandatory for freestanding implementations Date: Thu, 07 May 2020 12:54:41 -0700 Organization: A noiseless patient Spider Lines: 14 Message-ID: <878si3bjwe.fsf@nightsong.com> References: <3e5a2404-f2a9-3503-31f6-1c0040d34945@t-online.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="1aebd029f7dfd2e97cf15665c980aa2f"; logging-data="25064"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+PDWj/3Qi8cUeGxmn/5VTe" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Cancel-Lock: sha1:KMD83mk+VzZUmBO0DX7cQrlGclM= sha1:Q4+lBmG2962rftID8B/xY2OolDs= Xref: csiph.com comp.std.c:6104 comp.arch.embedded:29636 Philipp Klaus Krause writes: > For many embedded users, memcpy() might be more useful and necessary > than long long or float. Also, memcpy() is easier to implement than > support for long long or float. Still the latter are currently mandatory > for freestanding implementations, while the former is not. Forth has a core wordset (basically a library) and a bunch of separate optional wordsets, each of which is standardized. Floating point arithmetic is an optional wordset so it's fine if your implementation doesn't have it. But if you do choose to supply floating point features, the standard says what those features should do, so you don't have to make it up as you go along. Maybe C could use a similar approach.