This is the mail archive of the gcc-bugs@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]
Other format: [Raw text]

Re: is it a bug or am I dumb


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


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