This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: ANSI C / assignment makes pointer from integer
- To: aj at suse dot de
- Subject: Re: ANSI C / assignment makes pointer from integer
- From: Sebastian Ude <ude at handshake dot de>
- Date: Tue, 07 Aug 2001 15:43:11 +0200
- Cc: gcc at gcc dot gnu dot org
- References: <hohevk9eue.fsf@gee.suse.de>
- Reply-To: ude at handshake dot de
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.