Peter N Lewis wrote:
I'm not sure if this is a bug, but the error you get when two symbols have the same name is rather obscure:
zany:~/unix/c/testpas% gpc -W -Wall testpas10.pas /var/tmp//ccWdBBvY.s:36:FATAL:Symbol _SAME already defined.
Example:
program testpas10;
procedure test( a: Integer ); attribute( name = 'SAME' ); begin WriteLn( a ); end;
procedure test2( a: Integer ); attribute( name = 'SAME' ); begin WriteLn( a ); end;
begin end.
I would expect a more sensible error.
Well, you're (explicitly!) producing a link-time problem, so you should expect an error from the linker, not the compiler, I'd say.
IOW, when using explicit linker names, I think it's the programmer's responsibility to ensure they are used correctly (i.e., match when referred to in different places, and don't conflict).
Frank