lostlander said:
In ARMCC, and Microsoft C, when i use a function which is never
defined or delared, it gives out a warning, not a compiling error?
why?
(This leads to a bug to my program since I seldom pay much attention
to warnings...)
Start paying attention to warnings. They're there for a reason.
Some warnings indicate serious problems in your code, even fatal
errors. Other warnings might indicate something that the compiler
isn't worried about, but that's actually ok (i.e., in some cases you
might know better than the compiler). Understanding the difference is
a substantial part of being a skilled C programmer.
One clue: adding a cast just for the purpose of silencing a warning is
practically never a good idea.
If you see a warning that you don't understand, and attempts to
understand it by reading your C reference materials and/or compiler
documentation aren't helpful, this newsgroup is a good place to ask
about it. Ideally, post a small complete program that exhibits the
warning, and the text of the warning itself. Copy-and-paste the
*exact* text both of the program and of the warning.