Path: utzoo!attcan!uunet!husc6!psuvax1!rutgers!cmcl2!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: Should I convert FORTRAN code to C? Message-ID: <8078@brl-smoke.ARPA> Date: 12 Jun 88 22:42:06 GMT References: <2742@utastro.UUCP> <225800036@uxe.cso.uiuc.edu> <522@white.gcm> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB)) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 18 In article <522@white.gcm> dc@white.UUCP (Dave Caswell) writes: >How does the compiler know that I will be linking with the standard library? >Does ANSI C allows compilers to "know" what these functions mean? >I wasn't aware that any of those functions were part of the C language. ANSI C distinguishes between "freestanding" and "hosted" implementations. (How you invoke either of these depends on the particular implementation; it's beyond the scope of the Standard for it to specify this.) A Standard-conforming hosted implementation provides a comfortably large set of standard library functions, and furthermore these external names are all reserved for the implementation. Therefore the compiler is free to treat the standard library functions as intrinsics whenever that would make sense. The lack of a standard library for hosted applications was one of the most glaring deficiencies in existing practice and thus one of the first things X3J11 decided to fix. (Actually /usr/group made a start on this.)