is it a bug or am I dumb

Nathan Sidwell
Sun Oct 13 11:37:00 GMT 2002

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

 >         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.


Dr Nathan Sidwell   ::   ::   CodeSourcery LLC
          'But that's a lie.' - 'Yes it is. What's your point?' : :

More information about the Gcc-bugs mailing list