2013/3/5 Jeffrey Walton <noloa...@gmail.com>:
> Hi All,
[...]
>
> void func (short);
> void short_test (void)
> {  short x = 0;
>    func(x);
> }
>
> From the bug report example above, the warning is telling me there
> would be a problem if `void func (short);` was not present since it
> would be assumed to be `void func (int)` (if I'm reading things
> correctly).
>
> How do I turn off warnings for missing prototype conversions that are
> not even present? The bug report does not list a workaround.
> -Wno-traditional-conversion was unrecognized. So I'm guessing it would
> be similar to -Wno-conversion-prototype, but I don't see it at
> http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html.
>
> Jeff

If I compile such code example:

  void short_test (void)
  {
    short x = 0;
    func(x);
  }


I got following warning messages:

$ gcc -c test.c -Wall
test.c: In function ‘short_test’:
test.c:7:4: warning: implicit declaration of function ‘func’
[-Wimplicit-function-declaration]

So I turn the warning off by using
'-Wno-implicit-function-declaration' and it works.

I think '-Wno-implicit-function-declaration' is the option your are
looking for~ :)


Best regards,
jasonwucj

Reply via email to