[fpc-devel] Multiple type sections - Far forward type declarations [feasible feature request?]

2017-10-30 Thread Sandro Cumerlato
Hello,
please take a look at this small example:

--
program types;

type
  PMyTypeA = ^MyTypeA;
  PMyTypeB = ^MyTypeB;

type
  MyTypeA = record
foo: integer;
bar: integer;
  end;

type
  MyTypeB = record
foo: string;
bar: string;
  end;

begin
end.
--

it obviously doesn't compile because there are multple "type" sections
defined and forward types are not properly resolved within the same "type"
section, reference: https://www.freepascal.org/docs-html/ref/refse16.html

Considering that I often encounter difficulties translating C headers to
Pascal because declared types are most of the time dislocated in the header
source file and splitted in different blocks, I'd like to know if there is
a switch to enable forward type resolution within the same source file at
least, and if not please let me know if it can be considered a feasible
feature request.

Thank You in advance.

Sandro Cumerlato
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] x86_64.inc CompareByte

2017-10-30 Thread C Western

On 29/10/17 22:18, Florian Klämpfl wrote:


I have committed your lastest patch with a few changes: the loop entry is 
aligned now to 16 bytes, I
used movb instead of movbzl and inc instead of add. For me (Haswell CPU) this 
works better. I think
also these changes are better on average.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

With this patch on x86_64 linux lazarus crashes at random places, but 
quite frequently, and CompareByte seems to be implicated. Should the 
zero exit be:


xorl%rax, %rax

Colin
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel