This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: ANSI C / assignment makes pointer from integer




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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]