Consider the following situation:
program Foo;
function a: Integer;
function a: Integer; begin a := 42 end;
begin a := a end;
begin WriteLn ('OK') end.
The problem here is that within the outer `a', the identifier `a' can mean both its result variable and the local function `a'.
BP allows the declaration, but not the assignment `a := a' (because apparently interprets `a' to mean the local `a'), so there seems to be no way to return a meaningful value from the outer `a' which would render the function quite useless.
In EP I don't seem to find any wording that forbids it (but it's quite confusing as usual, so I might have missed it).
GPC currently doesn't allow the declaration of the inner `a'. This seems reasonable to me, but is it conforming with the standard?
Frank