At 07:23 2000.05.19 -0600, Kurt Wall wrote:

>$ gcc -ansi -Wall foo.c
>foo.c: In function `main':
>foo.c:18: warning: implicit declaration of function `fdopen'
>foo.c:18: warning: assignment makes pointer from integer without a cast
>
>I'm a touch stumped: fdopen is declared in <stdio.h> and most certainly
>returns FILE *.  If I don't use `-ansi', I get no warnings, so I'm
>guessing the issue is that fdopen is POSIX.1 compliant, but not ANSI
>compliant.

SUS2 indeed says fdopen() is declared in stdio.h. But fdopen()
is not part of ISO C (at least it doesn't appear in any of the
draft standards that I have).

If -ansi is used, GCC defines __STRICT_ANSI__. Now try grepping
for that macro in /usr/include/*.h...


Andr� Majorel <[EMAIL PROTECTED]>
http://www.teaser.fr/~amajorel/

Reply via email to