is it a bug or am I dumb

Phil Edwards
Sat Oct 12 23:35:00 GMT 2002

On Sun, Oct 13, 2002 at 01:10:53AM -0700, John wrote:
> I am not sure if this is a bug or not, but, it is driving me crazy!

Yes, it's a bug in your code.

> here is the invocation of gcc and the results:
>> gcc -o ctest ctest.c
> ctest.c: In function `main':
> ctest.c:23: warning: assignment makes pointer from integer without a cast

Try running it with a higher warning level, such as "-Wall".  You will
see a warning about parentheses around assignments used as truth values,
and that should suggest the nature of the problem.  If it doesn't, consult
a good C textbook.


I would therefore like to posit that computing's central challenge, viz. "How
not to make a mess of it," has /not/ been met.
                                                 - Edsger Dijkstra, 1930-2002

More information about the Gcc-bugs mailing list