Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch Newsgroups: comp.std.c Subject: Re: Making more of the C standard library mandatory for freestanding implementations Date: Thu, 07 May 2020 06:08:18 -0700 Organization: A noiseless patient Spider Lines: 22 Message-ID: <86o8qzzyd9.fsf@linuxsc.com> References: <87pnbgzudz.fsf@nosuchdomain.example.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader02.eternal-september.org; posting-host="b769366f99350c90aa3bc88bc2611d43"; logging-data="28331"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19NEvBAeFSpli+IWeM6azkREL/8nCnOv4U=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:Qr1IHncdMZE95/10Y3u8Mnoleas= sha1:JBjavOqSOs3YZR9aE53wGh03FWc= Xref: csiph.com comp.std.c:6095 Keith Thompson writes: > [...] there's nothing in the Standard to say that a freestanding > implementation that implements part of the hosted standard library > has to do it correctly. I'm not sure that's right. A freestanding implementation isn't required to accept programs that use those headers, but I don't see anything that would allow the implementation to violate their specifications either. Also, the Standard says implementations may have extensions provided they do not alter the behavior of /any/ strictly conforming program. The definition of strictly conforming program includes all library facilities, not just those required of freestanding implementations. Certainly a freestanding implemention is free not to provide any library facilities beyond its minimal required set, but AFAIK there isn't any provision that would allow it to change the behavior of any it does provide. Please note, I'm not making an argument that the statement is wrong. But I do think the answer is not completely clearcut, and the question is open to debate.