Re: [fpc-pascal] using Interfaces in descendant classes 2.6.4 vs 3.x

2017-11-03 Thread Graeme Geldenhuys
On 2017-11-03 23:52, Graeme Geldenhuys wrote: Attached is a sample application reproducing the problem. Compile the program with FPC 2.6.4 and everything works. Compile it with FPC 3.x and no interface reference is ever returned. Yet more testing. Now I've managed to get it to work in all

Re: [fpc-pascal] using Interfaces in descendant classes 2.6.4 vs 3.x

2017-11-03 Thread Graeme Geldenhuys
Attached is a sample application reproducing the problem. Compile the program with FPC 2.6.4 and everything works. Compile it with FPC 3.x and no interface reference is ever returned. Sample output: ===[ compiled with FPC 3.0.0, 3.0.2, 3.0.4 and 3.1.1] [tmp]$ ./project1 TClass

Re: [fpc-pascal] using Interfaces in descendant classes 2.6.4 vs 3.x

2017-11-03 Thread Graeme Geldenhuys
On 2017-11-03 23:09, Graeme Geldenhuys wrote: I looked at the wiki and the FPC 3.x "User Changes" pages and the only reference to Interface changes is this. http://wiki.freepascal.org/User_Changes_3.0.0#Classes_implementing_forward-declared_interfaces Please note that I'm not using Interf

[fpc-pascal] using Interfaces in descendant classes 2.6.4 vs 3.x

2017-11-03 Thread Graeme Geldenhuys
Hi, Some of my programs were last compiled with FPC 2.6.4, and there I used Corba-style Interfaces without a problem. I've now recompiled those projects with FPC 3.0.4 and the program immediately crashes. Debugging I found that I was trying to use a interface reference, but forgot to check i

Re: [fpc-pascal] fcl-passrc: in which line a TPasElement ends?

2017-11-03 Thread Michael Van Canneyt
On Fri, 3 Nov 2017, Michael Fuchs wrote: Sorry, some message were not sent to list, my fault: Am 03.11.2017 um 14:132 schrieb Michael Van Canneyt: Are there plans for a support in future? Or can you give me some advices how I can implement this by myself? I'm afraid I am an absolutly newb

Re: [fpc-pascal] fcl-passrc: in which line a TPasElement ends?

2017-11-03 Thread Michael Fuchs
Sorry, some message were not sent to list, my fault: Am 03.11.2017 um 14:132 schrieb Michael Van Canneyt: >> Are there plans for a support in future? Or can you give me some >> advices how I can implement this by myself? I'm afraid I am an >> absolutly newbie in this part of of the FCL.> > Ther

Re: [fpc-pascal] fcl-passrc: in which line a TPasElement ends?

2017-11-03 Thread Michael Van Canneyt
On Fri, 3 Nov 2017, Michael Fuchs wrote: Hi, a question to TPasElement of fcl-passrc: To get the line in which the element starts I use the public SourceLinenumber field. But how do I get the last line of this element? Currently this is not supported. Michael.

[fpc-pascal] fcl-passrc: in which line a TPasElement ends?

2017-11-03 Thread Michael Fuchs
Hi, a question to TPasElement of fcl-passrc: To get the line in which the element starts I use the public SourceLinenumber field. But how do I get the last line of this element? g Michael ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http

Re: [fpc-pascal] cpu_relax() in freepascal

2017-11-03 Thread Matias Vara
Hi and thanks for the answers, This feature seems to be a compiler intrinsic at least in the Intel C > compiler. We don't have anything similar, so you have to fall back either > to an asm procedure or a line of inline assembler. The compiler is also > not doing an optimization similar to this. Fr

Re: [fpc-pascal] cpu_relax() in freepascal

2017-11-03 Thread Karoly Balogh (Charlie/SGR)
Hi, On Fri, 3 Nov 2017, Matias Vara wrote: > Hello,  I think it would be better if I put my question in context. In > order to tell the processor that we are in a loop, the pause instruction > could be used (also I think the "rep nop" produces the same opcode). > This tells the processor that we

Re: [fpc-pascal] cpu_relax() in freepascal

2017-11-03 Thread Adriaan van Os
I want to implement the cpu_relax() function in order to use it inside loops. However before, I would like to know if the fpc compiler is doing an optimization of this kind. I don't think one would you use that "inside a loop" or "to improve branching" but rather inside a wait-loo

Re: [fpc-pascal] cpu_relax() in freepascal

2017-11-03 Thread Matias Vara
Hello, I think it would be better if I put my question in context. In order to tell the processor that we are in a loop, the pause instruction could be used (also I think the "rep nop" produces the same opcode). This tells the processor that we are in a loop so it improves the access to the cache

Re: [fpc-pascal] FPC install on windows with limited rights

2017-11-03 Thread Martok
Am 02.11.2017 um 21:00 schrieb Graeme Geldenhuys: > The FPC team really should consider releasing a Windows binary zip > release too. It really wouldn't be any extra effort as they already prep > everything for Inno Setup, so a simply ZIP command is all that would be > needed. In case you don't