question. But I really wanted to know about a trivial technicality:
gcc doesn't distinguish, for example, between the following
declarations.
int g( int (*const)(int x) );
int g( int (*f)(int const) );
Is this correct behaviour?
In both cases, you are prototyping a function that takes a function
On Sat, 12 Jul 2003 15:09:47 +0100
John Lamb wrote:
pointer as an argument. In the first case, I believe that you are making
the function pointer const, and in the second case, you are making the
argument to the function pointed to const.
Not having tested it with GCC, but I really think this is a trivial
issue (at least with the int argument). I also think that there is room
for the compiler to misinterpret.
However, if you want to discuss this further we can do it in person. The
BLU is having a BarBQ today (http://www.blu.org). Why not grab the
closest Jet and fly up to Boston :-). The weather is great today.
--
Jerry Feldman
Boston Linux and Unix user group
http://www.blu.org PGP key id:C5061EA9
PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9