This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
warn about function without & or arguments?
- From: Matthew Woehlke <mw_triad at users dot sourceforge dot net>
- To: gcc-help at gcc dot gnu dot org
- Date: Mon, 16 Apr 2007 14:48:26 -0500
- Subject: warn about function without & or arguments?
If I have e.g.
typedef void (* fp)();
void foo() { ...}
void bar(fp f) { ... }
int main() {
bar(foo); // <-- should generate a warning!
}
...is there a warning flag (for C) in either gcc 3.4.4 or 4.x to warn
about using 'foo' (as opposed to 'foo()' or '&foo')?
--
Matthew
GDRLaH - Grin, Duck, and Run Like a Hippo! :-)