Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!bellcore!rutgers!tut.cis.ohio-state.edu!iguana.cis.ohio-state.edu!meranda From: meranda@iguana.cis.ohio-state.edu (deron meranda) Newsgroups: comp.std.c Subject: Re: ANSI C standard library Message-ID: <114913@tut.cis.ohio-state.edu> Date: 1 May 91 03:41:13 GMT References: <681@taumet.com> <1991Apr25.201855.27893@watdragon.waterloo.edu> <695@taumet.com> Sender: news@tut.cis.ohio-state.edu Organization: The Ohio State University, Department of Computer and Information Science Lines: 35 In article <695@taumet.com> steve@taumet.com (Stephen Clamage) writes: >There have been a number of postings and some private mail regarding my >comments that almost all of the ANSI C library can be written in >strictly-conforming C. Only three functions have been identified as not >possible to write -- setjmp, longjmp, and (being VERY strict) memmove. > >The comments challenging my statement generally confound the concept of >"strictly conforming" with "completely portable". The two concepts >are not the same. > >Strictly-conforming C code may call an external function not supplied >with the translation unit: >... This is all very true. Most of the C library can indeed be written in strictly-conforming C, although we may need to use external functions to accomplish this. However, perhaps a more informative question would be how much of the C library can be written ENTIRELY in strictly conforming C without the help of other external functions. Again, however this is quite different than the question of portability. For example, consider the function strchr (section 4.11.5.2). Clearly if it were implemented entirely in C, it has to produce a plain char * from a const char *. Although most compilers will allow this with a warning, it is not strictly-conforming C. Understanding these kinds of problems are more important to me in implementing the C library in C than realizing that some functions require some external support. So how does the library stand against this criterion? Deron E. Meranda ( meranda@cis.ohio-state.edu )