This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: is it a bug or am I dumb
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: John <jcmackey at swbell dot net>
- Cc: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 13 Oct 2002 19:37:11 +0100
- Subject: Re: is it a bug or am I dumb
- Organization: Codesourcery LLC
- References: <011301c27290$0cd83bf0$6701a8c0@hercules>
John wrote:
I am not sure if this is a bug or not, but, it is driving me crazy!
It is a fault in your code.
ctest.c:23: warning: assignment makes pointer from integer without a cast
what is being assigned to? how can the assigned type have an integral
type?
> if ( p = (char *) malloc( strlen( test_string ) + 1 ) != NULL )
what does your debugger tell the value of p is after this statement?
enlightenment should follow.
I have come to expect from the compilers I use on SCO Unix. I copied that
syntax from the book "The C Programming Language" by K & R.
No, you haven't :)
this is a C problem, not gcc.
nathan
--
Dr Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org