The following piece of code should compile without warning: #include <stdio.h>
int main() { (void)fileno(0); return 0; } Using: $ gcc -Wall -W -pedantic -ansi -Werror f.c cc1: warnings being treated as errors f.c: In function 'main': f.c:5: warning: implicit declaration of function 'fileno' With: $ gcc --version gcc (GCC) 4.2.3 (Debian 4.2.3-3) Copyright (C) 2007 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. thanks -- Summary: warning: implicit declaration of function 'fileno' Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: mathieu dot malaterre at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37771