Under Win32, it seems that lazarus uses -S2 as a default compiler option.
As seen in a french Forum, freepascal has a little bug, ie with this option it doesn't want to compile this code :
type
MyClass = class
private
// some private declarations
public
function IsGonnaMakeItBug: string;
procedure MyProc(IsGonnaMakeItBug: extended);
end;
Because it doesn't allow the use of the same name for this function and the var in the next proc... Strange behaviour 'cause this code is correct and works on Delphi 2.
However, freepascal can compile it using -Sd with no message error.
I tried to change the option in lazarus IDE using (in french)
projet>>options du compilateur>>Analyse
and I chose -Sd ...
Lazarus still couldn't compile.
I tried to manually define this option in fpc.cfg in C:\lazarus\pp\bin\i386-win32 and it doesn't work :cry:
Of course I can just change the name of one of two items to solve this issue, but this example shows that Lazarus chooses its compiler options and the user can't change them... Is it a bug?
Does anyone have the solution?
Thancks...
Clandestino