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: Phil Edwards <phil at jaj dot com>
- To: John <jcmackey at swbell dot net>
- Cc: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 13 Oct 2002 02:35:15 -0400
- Subject: Re: is it a bug or am I dumb
- References: <011301c27290$0cd83bf0$6701a8c0@hercules>
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:
>
> buzzhead.net-:/root> 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.
Phil
--
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