🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #1628

Spurious warnings...

#1628
From: Przemek Skoskiewicz
Date: Mon, 11 Jan 1993 21:52
38 lines
1435 bytes
Compiling the following code with -Wall option produces these warnings:

>gcc -Wall bar.c
bar.c:5: warning: return-type defaults to `int'
bar.c: In function `main':
bar.c:10: warning: implicit declaration of function `_filbuf'   <----
bar.c:11: warning: implicit declaration of function `fclose'    <----
bar.c:12: warning: control reaches end of non-void function


Why do I get the warnings for _filbuf and fclose given the fact that I've
included the stdio.h header file (especially in view of the lack of a warning
for fopen)?  I'm especially interested in _filbuf since it's cluttering the
more important warnings generated by the -Wall option.


#include    "stdio.h"

main()
{
    int     ch;
    FILE   *fp;

    fp = fopen ("bar.c", "r");
    ch = getc (fp);
    fclose (fp);
}


System: SPARCstation IPX
OS:     SunOS 4.1.3
GCC:    2.2.2 and 2.3.2 and 2.3.3


Viewlogic Systems, Inc.                         Przemek Skoskiewicz
293 Boston Post Road West
Marlborough, MA 01752-4615, USA
email: przemek@viewlogic.com
Technical Details
Message-ID: <9301112152.AA06322@elvis>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!viewlogic.COM!przemek

Show Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!viewlogic.COM!przemek
From: przemek@viewlogic.COM (Przemek Skoskiewicz)
Subject: Spurious warnings...
Message-ID: <9301112152.AA06322@elvis>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Mon, 11 Jan 1993 21:52:21 GMT
Approved: bug-gcc@prep.ai.mit.edu
Lines: 39