🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #50420

Re: where is printf, scanf, ....?

#50420
From: Vivek Khera
Date: Tue, 28 Sep 1993 17:10
28 lines
2164 bytes
>>>>> "PvdS" == Patrick van der Smagt <smagt@fwi.uva.nl> writes:

PvdS> Big question mark.  If one compiles a C program with option
PvdS> -Wall, gcc complains about implicit declaration of printf &c.
PvdS> That makes sense, since printf is never declared in, e.g.,
PvdS> stdio.h.  There must be a reason for this??

PvdS> Any explanations will be tremendously appreciated.


There are two variations on having an ANSI C compiler: a hosted
implementation and an unhosted implementation.  gcc falls into the
latter category.

A hosted ANSI C system includes all the headers and the C library as
defined by most good ANSI C books.

An unhosted ANSI C compiler is just that: a compiler.  There is no
mention of headers or a library.  It is up to you (or your system
vendor) to provide the proper ANSI headers and libraries.  You can't
expect the headers to be ANSI compliant or to have proper prototypes,
nor can you expect the C library to contain all the ANSI C library
functions.
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Gradual Student/Systems Guy  Department of Computer Science
Internet: khera@cs.duke.edu               Box 90129
          RIPEM/PGP/MIME spoken here      Durham, NC 27708-0129 (919)660-6528
Technical Details
Message-ID: <KHERA.93Sep28131041@thneed.cs.duke.edu>
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!spool.mu.edu!darwin.sura.net!news-feed-1.peachnet.edu!concert!duke!khera
References: <288tkt$oav@mail.fwi.uva.nl>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,c7543ffd03a05bc7
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1993-09-28 11:17:50 PST
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!spool.mu.edu!darwin.sura.net!news-feed-1.peachnet.edu!concert!duke!khera
From: khera@cs.duke.edu (Vivek Khera)
Newsgroups: gnu.gcc.help
Subject: Re: where is printf, scanf, ....?
Message-ID: <KHERA.93Sep28131041@thneed.cs.duke.edu>
Date: 28 Sep 93 17:10:39 GMT
References: <288tkt$oav@mail.fwi.uva.nl>
Sender: news@duke.cs.duke.edu
Organization: Duke University CS Dept., Durham, NC
Lines: 28
Nntp-Posting-Host: thneed.cs.duke.edu
To: smagt@fwi.uva.nl (Patrick van der Smagt)
In-reply-to: smagt@fwi.uva.nl's message of 28 Sep 93 08:46:21 GMT
X-Md4-Signature: c63e595ee8bb633ccd6b922364df8b54
X-Md5-Signature: f03039295989b51caba35dc23fc62a2a