[cfe-dev] -Wimplicit-function-declaration doesn't work?
Douglas Gregor
dgregor at apple.com
Wed Jan 28 16:48:57 PST 2009
On Jan 28, 2009, at 2:09 PM, Alexei Svitkine wrote:
> I'm trying to get the warning output of the code:
>
> int main(void)
> {
> strcmp("abc","def");
> return 0;
> }
>
> However, running "clang -Wimplicit-function-declaration" doesn't seem
> to produce any output.
>
> Am I doing something wrong?
With -pedantic, I see:
/Users/dgregor/foo.c:3:2: warning: implicit declaration of function
'strcmp' is invalid in C99
strcmp("abc","def");
^
1 diagnostic generated.
- Doug
More information about the cfe-dev
mailing list