lostlander wrote:
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?
Under "C90" rules, and under "K&R" rules even before them,
using an undeclared function is/was legal. The compiler assumes
that the unknown function takes an unknown number of arguments of
unknown types and returns an int value. If you write `f(42)' with
no declaration of `f', the compiler acts as it would if you had
previously written `int f();' as a declaration.
Under "C99" rules it is an error to use an undeclared function.
However, the Standard doesn't really distinguish between "errors"
and "warnings" (except in the case of the #error directive), so
the only real change is from "diagnostic optional" to "diagnostic
required."
(This leads to a bug to my program since I seldom pay much attention
to warnings...)
Trying for a Darwin Award, are you?
--
Eric Sosman
es*****@ieee-dot-org.invalid