Re: implicit void arguments not checked?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



florin@xxxxxxxxx (Florin Iucha) writes:

> 1. Shouldn't gcc at least warn about greet being called with and argument
> that is not present in the declaration?

No.  In C, "void fn()" means that you are not saying anything about
the arguments accepted by the function.  As you mentioned, the way to
say that a function takes no arguments is "void fn(void)".

> 2. What -W option should I use to get the warning (if it is not by
> default in Wall)?

-Wstrict-prototypes

Ian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux