🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #11

How to get ANSI C prototypes for std. libs. with GCC ?

#11
From: Erik Simonsen
Date: Wed, 28 Oct 1992 17:11
40 lines
1905 bytes
Hello world,

I'm facing a problem with gcc and ANSI C that I hope a hint from one of
you out there in netland can help me solving.
 
Without success, I have been trying to get ANSI C prototypes for the C 
standard library functions. Programs are compiled with the following command:

  gcc -ansi -Wall -g -I$(MYINC) -c hello.c

which issues warnings like this:

  hello.c :7: warning: implicit declaration of function `fprintf'

Are there a particular header file to include or still another option
for gcc to activate?

I would like to use gcc for K&R C and for ANSI C. Are there separate header
files (for stdandard libraries) or are the same files used for the two modes?

Hardware: SUN SPARC
OS: SUN OS 4.1.1
GCC version 2.1 and 2.2.2 (both same problem)

Thanks in advance and roger-over...

Erik

---

Erik Simonsen, ESA/ESTEC WDP                __  __   _  European
Postbus 299, 2200 AG Noordwijk             /_  (_   /_| Space
Phone: +31 1719 3133 Fax: +31 1719 84295  /__  __) /  | Agency
E-mail: esimon@wd.estec.esa.nl           =======================

--
Erik Simonsen, ESA/ESTEC WDP                __  __   _  European
Postbus 299, 2200 AG Noordwijk             /_  (_   /_| Space
Phone: +31 1719 3133 Fax: +31 1719 84295  /__  __) /  | Agency
E-mail: esimon@wd.estec.esa.nl           =======================
Technical Details
Message-ID: <esimon.720292272@imlab1>
Path: arc1-ca.pugleaf.net!sparky!uunet!ogicse!uwm.edu!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!wd.EStec.NL!esimon

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!ogicse!uwm.edu!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!wd.EStec.NL!esimon
From: esimon@wd.EStec.NL (Erik Simonsen)
Newsgroups: gnu.gcc.bug
Subject: How to get ANSI C prototypes for std. libs. with GCC ?
Keywords: ANSI C GCC
Message-ID: <esimon.720292272@imlab1>
Date: 28 Oct 92 17:11:12 GMT
Article-I.D.: imlab1.esimon.720292272
Sender: gnulists@ai.mit.edu
Reply-To: esimon@wd.estec.esa.nl
Distribution: gnu
Organization: ESA/ESTEC
Lines: 40
Approved: bug-gcc@prep.ai.mit.edu