warn about function without & or arguments?

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

 



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! :-)


[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