🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #2328

gcc prototype enforcer

#2328
From: Michael Tiemann
Date: Mon, 20 Feb 1989 00:53
21 lines
955 bytes
> whatsoever is made of the function, and rightly so.  However, if the
> function is declared in the old style, eg. (from /usr/include/stdio.h)
> 
> 	extern char *fgets();
> 
> gcc doesn't say a thing.

The GNU C++ compiler has a flag -fstrict-prototype

When this option is enabled, it treats

	extern char *fgets ();

as

	extern char *fgets (void);

and this will complain as desired.  Perhaps it would be a good idea to
put that code into GNU CC.

Michael
Technical Details
Message-ID: <8902200053.AA02085@yahi.Stanford.EDU>
Path: arc1-ca.pugleaf.net!utzoo!telly!attcan!dptcdc!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!YAHI.STANFORD.EDU!mdt
References: <1261@ubu.warwick.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!attcan!dptcdc!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!YAHI.STANFORD.EDU!mdt
From: mdt@YAHI.STANFORD.EDU (Michael Tiemann)
Newsgroups: gnu.gcc.bug
Subject: gcc prototype enforcer
Message-ID: <8902200053.AA02085@yahi.Stanford.EDU>
Date: 20 Feb 89 00:53:56 GMT
References: <1261@ubu.warwick.UUCP>
Sender: daemon@tut.cis.ohio-state.edu
Reply-To: tiemann@lurch.stanford.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 21