warn about function without & or arguments?
John Love-Jensen
eljay@adobe.com
Mon Apr 16 20:31:00 GMT 2007
Hi Matthew,
> ...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')?
Both foo and &foo are function pointers to the foo() function.
The &foo is superfluous, but allowed.
Sort of like (but different) how int array[] = { 0,1,2,3 };, where array
degenerates into int* to the array, and refers to &array[0].
HTH,
--Eljay
More information about the Gcc-help
mailing list