Thread View: gnu.gcc.bug
1 messages
1 total messages
Started by Przemek Skoskiewicz
Mon, 11 Jan 1993 21:52
Spurious warnings...
Author: Przemek Skoskiewicz
Date: Mon, 11 Jan 1993 21:52
Date: Mon, 11 Jan 1993 21:52
38 lines
1435 bytes
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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads