ANSI C / assignment makes pointer from integer
Sebastian Ude
ude@handshake.de
Tue Aug 7 06:43:00 GMT 2001
On Tue, 07 Aug 2001, aj@suse.de (Andreas Jaeger) wrote:
> Date: Tue, 07 Aug 2001 15:31:05 +0200
> To: ude@handshake.de
> From: aj@suse.de (Andreas Jaeger)
> CC: bohdan@kivc.vstu.vinnica.ua, gcc@gcc.gnu.org
> Subject: Re: ANSI C / assignment makes pointer from integer
>
> Sebastian Ude <ude@handshake.de> writes:
>
> > I *did* include string.h.
>
> But strdup is not part of ANSI C, check:
>
> gee:~/tmp:[0]$ gcc -Wall -ansi str.c
> str.c: In function `main':
> str.c:5: warning: implicit declaration of function `strdup'
> str.c:5: warning: initialization makes pointer from integer without a
> cast
> str.c:5: warning: unused variable `s'
>
> implicit declared functions return int...
Yep, I discovered that myself a few minutes ago
(-Wimplicit-function-declaration).
Thanks anyway.
More information about the Gcc
mailing list