G
Gand Alf
Hello
Imagine the following code occurring at Function Scope:
{
f();
}
Now there might be two valid programmer intentions here.
Either he is declaring f to be a function returning int and taking an
unspecified number of arguments.
Or, he is calling a function f with no arguments and discarding it's
return value.
Most compilers seem to prefer the second interpretation. However, as it
would be possible to call the function unambiguously by dereferencing:
(*f)();
wouldn't it be preferable for the first interpretation to be made?
[Rgds]
Imagine the following code occurring at Function Scope:
{
f();
}
Now there might be two valid programmer intentions here.
Either he is declaring f to be a function returning int and taking an
unspecified number of arguments.
Or, he is calling a function f with no arguments and discarding it's
return value.
Most compilers seem to prefer the second interpretation. However, as it
would be possible to call the function unambiguously by dereferencing:
(*f)();
wouldn't it be preferable for the first interpretation to be made?
[Rgds]