home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: gnu.gcc.bug
- Path: 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
-
- 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
-
-