[Lazarus] Note: Local variable "$defaultbufpos" not used
Bernd
prof7bit at googlemail.com
Fri Jul 16 02:28:10 CEST 2010
library project1;
{$mode objfpc}{$H+}
function foo: LongInt;
var
x: LongInt = 0;
begin
Result := x;
end;
exports
foo;
{$R *.res}
begin
end.
the following is in the diff when i switch from program to library:
***************
*** 12,19 ****
pushl %ebp
movl %esp,%ebp
subl $8,%esp
- movl TC_P$PROJECT1_FOO$$LONGINT_defaultx,%eax
- movl %eax,-8(%ebp)
movl -8(%ebp),%eax
movl %eax,-4(%ebp)
movl -4(%ebp),%eax
These two assembler statements are missing when compiled as library, but the
TC_P$PROJECT1_FOO$$LONGINT_defaultx
in the data section at the end is still there and there:
.section .data.n_tc_p$project1_foo$$longint_defaultx
.balign 4
.globl TC_P$PROJECT1_FOO$$LONGINT_defaultx
TC_P$PROJECT1_FOO$$LONGINT_defaultx:
.long 0
More information about the Lazarus
mailing list