[fpc-devel] How to convert set to integer and vice versa

2014-07-22 Thread Gennady Agranov
Hi, I am new to FPC, but I do like it - thanks! We are trying to switch from Delphi to FPC, but I am stuck with the following issue - in Delphi you can cast set to integer and get it back later - again by casting. In our case it is used for persistence purposes. We have a lot of different

Re: [fpc-devel] How to convert set to integer and vice versa

2014-07-22 Thread Gennady Agranov
On Tue, Jul 22, 2014 at 5:14 AM, Marco van de Voort mar...@stack.nl wrote: In our previous episode, Gennady Agranov said: I am new to FPC, but I do like it - thanks! We are trying to switch from Delphi to FPC, but I am stuck with the following issue - in Delphi you can cast set

Re: [fpc-devel] How to convert set to integer and vice versay

2014-07-22 Thread Gennady Agranov
On Tue, Jul 22, 2014 at 12:13 PM, Marco van de Voort mar...@stack.nl wrote: In our previous episode, Gennady Agranov said: Good. And afaik in Delphi mode this works too in FPC? Did you test? casting integer to set does not compile in FPC - and yes - I use Delphi mode :( program

Re: [fpc-devel] How to convert set to integer and vice versay

2014-07-22 Thread Gennady Agranov
); end. On Tue, Jul 22, 2014 at 4:35 PM, Gennady Agranov gennadyagra...@gmail.com wrote: Thanks! Your example does compile, but if you replace 31 with 32 - it will not compile - no matter what you use - integer, int64 or qword And I guess I know the reason now - sizeof(left) should be equal

Re: [fpc-devel] How to convert set to integer and vice versay

2014-07-22 Thread Gennady Agranov
But does that work in Delphi, did you test? You are correct - Delphi also requires that source and target are of same size - thanks! I finally figured why existing Delphi code was not compiling - I did not use {$mode delphi} in the unit - i did not want to add {$mode dlephi} to every

[fpc-devel] Question about local variables initialization

2014-09-19 Thread Gennady Agranov
Hi, I do not have clear picture about initialization of local variables - are they initialized to some default value or not - and is there a way to assure that every local variable (including record types) is set to some default? Of course the safest approach is to assume that everything

Re: [fpc-devel] Suggestion: reference counted objects

2014-09-20 Thread Gennady Agranov
Hi, I will address multiple previous e-mails on this subject :) 1. FPC does perform reference counting if variable type is interface, but not if variable type is class that implements interface - legacy/compatibility reasons? If you want to do ARC for objects - just remove this limitation

Re: [fpc-devel] Suggestion: reference counted objects

2014-09-21 Thread Gennady Agranov
I just want to remind you people (whoever is working on it) that ARC is already implemented in FPC for interface types and I am personally satisfited with the way /it works now/ for interface variables, and only wish that I could enable this feature for class instance variables. Can't

[fpc-devel] IComparer vs CompareFunc

2014-11-24 Thread Gennady Agranov
Hi, I am trying to have some code that uses generics to compile under Delphi and under FPC (uses fgl) In Delphi I pass IComparerT and in FPC TCompareFuncT IComparerT is an object and I can create it with some state that compare method can use :) In FPC I should pass function: TCompareFunc =

[fpc-devel] What is the status of fpc generics.collections.

2014-11-24 Thread Gennady Agranov
Hi, I have found the old announcement about fpc-generics-collections, but all links are broken... What is the status of this project? Is it still downloadable? Thank you, Gennady [fpc devel] Library announcement: Generics.Collections

[fpc-devel] can't build trunk for x86_64-linux (suse-64)

2014-11-24 Thread Gennady Agranov
suse-32 builds fine though ... Anything obvious I have missed? Thanks, Gennady Start compiling package gdbint for target x86_64-linux. File libgdb.a not found Compiling gdbint/src/gdbint.pp Compiling gdbint/src/gdbcon.pp Compiling gdbint/src/gdbver.pp Linking

[fpc-devel] Question about 2.7.1 graduation

2014-11-25 Thread Gennady Agranov
Hi, When can regular FPC user expect 2.7.1 to graduate and be marked as stable release? Somewhere in Spring - like 2.6.4? Thanks, Gennady ___ fpc-devel maillist - fpc-devel@lists.freepascal.org

[fpc-devel] Question about building fpc for linux_x86 vs linux_x64

2014-12-28 Thread Gennady Agranov
Hi, I have built FPC from trunk - thanks to fpcup!!! For linux_x64 it built as is - great! For linux_x86 I had to add dependencies for rtl-objpas, rtl-extras, rtl-console and fcl-base to the following packages: M ide/fpmake.pp M utils/fpdoc/fpmake.pp M utils/fpmake.pp M

Re: [fpc-devel] Question about building fpc for linux_x86 vs linux_x64

2014-12-28 Thread Gennady Agranov
No, you do not have enough permissions to commit. But can you send the patch, so that I can see what you've changed? output of svn diff attached :) Thanks, Gennady Regards, Joost. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org

Re: [fpc-devel] Question about building fpc for linux_x86 vs linux_x64

2014-12-28 Thread Gennady Agranov
1. Sounds like fpmake doesn't recursively add dependencies? e.g. rtl-objpas should come as dep of fcl-base. 2. if the patch just adds ALL those dependencies to all those packages, are they really tested as being really required for all of those? I knew that I should be more verbose in my

Re: [fpc-devel] Question about building fpc for linux_x86 vs linux_x64

2014-12-28 Thread Gennady Agranov
1. Sounds like fpmake doesn't recursively add dependencies? e.g. rtl-objpas should come as dep of fcl-base. I am not familar at all with fpmake design - if fcl-base depends on rtl-objpas - does it mean that rtl-objpas dependency is exported - i.e. -Fu to rtl-objpas will be added if only

[fpc-devel] Question about runtime error 219

2015-01-09 Thread Gennady Agranov
Hi All, What exactly -CR (Verify object method call validity) code generation is checking and how tested is it? For debugging I prefer to enable all possibles checks - range, overflow, ... But i can not use -CR: 1. I passed some var array of array parameter - error 219 - changed to var

[fpc-devel] ppudump question

2015-08-22 Thread Gennady Agranov
Hi, 1. I have code that heavily uses enums/sets When I use ppudump to print *.ppu files I see some sets reported with null ElType and I do not understand what causes them :( And I do not believe that they are referenced at all... Any ideas why set is reported with no ElType? Thanks,

Re: [fpc-devel] ppudump question

2015-08-24 Thread Gennady Agranov
...@lists.freepascal.org] De la part de Gennady Agranov Envoyé : dimanche 23 août 2015 00:46 À : fpc-devel@lists.freepascal.org Objet : [fpc-devel] ppudump question Hi, 1. I have code that heavily uses enums/sets When I use ppudump to print *.ppu files I see some sets reported with null ElType and I do

Re: [fpc-devel] Can FPC at least give a hint/warning?

2016-11-08 Thread Gennady Agranov
Hi, Or what are the conditions when you want to emit the hint? I thought that hint could come from some layer that actually allocates the record - on the stack or on the heap - this layer may actually know the "effective" alignment Heap allocation should be aligned to the largest required

[fpc-devel] Can FPC at least give a hint/warning?

2016-11-06 Thread Gennady Agranov
Hi, I have submitted a bug - http://bugs.freepascal.org/view.php?id=30872 (misaligned data exception on ARMv7) And this big was resolved as "won't fix" 1. I understand that one has to work really hard to encounter this bug - and there are easy workarounds, but it there are also different

Re: [fpc-devel] About building JNI library for arm-linux

2016-10-31 Thread Gennady Agranov
I thought that "reply" and changing the subject to a new one will do the trick... Is "topic" stored somewhere in the mail headers? Sorry, Gennady On 10/31/2016 4:42 PM, wkitt...@windstream.net wrote: On 10/31/2016 04:01 PM, Gennady Agranov wrote: Hi, I have an is

[fpc-devel] About building JNI library for arm-linux

2016-10-31 Thread Gennady Agranov
>>> Why do you use LCL in your JNI library? >>> Try a simple library without LCL and check if it loads. It works! Great Thanks! Does anyone know what to do about: Java HotSpot(TM) Client VM warning: You have loaded library

[fpc-devel] About building JNI library for arm-linux

2016-10-31 Thread Gennady Agranov
Hi, I have an issue with loading JNI library for Raspberry :( I do compile with -Cg -WX and stack checking on (and also without). But even this method is not called :( function JNI_OnLoad(vm: PJavaVM; reserved: pointer): jint; {$ifdef linux}cdecl{$else}stdcall{$endif}; begin

Re: [fpc-devel] Problem with generic parameter

2017-01-01 Thread Gennady Agranov
Hi Sven, Based on bug#20503 you are in charge of support for "generics"? Thanks a lot for your work! What about this incompatibility - is it a known issue? {$ifdef FPC} if Arrays.BinarySearch(changes.m_children,node,j,getComparatorByName) then {$else} if

[fpc-devel] Problem with generic parameter

2016-12-30 Thread Gennady Agranov
Hi, Delphi mode, fpc 3.0.0 I have a Sort method: type TArray = class class procedure Sort(var Values: array of T; const Comparer: IComparer); end; If I call Sort with some real type it compiles and works: TArray.Sort(string,comparer); but if i call it from another generic type

Re: [fpc-devel] Why debugger does not "step in"?

2018-03-24 Thread Gennady Agranov
>>> It isn't a method of an "interface"? interfaces indeed have this issue. It is the case - thanks! Is it "nothing can be done about it" case? Is there an already submitted bug? Thanks, Gennady On 3/24/2018 4:42 AM, Martin Frb wrote: On 24/03/18 02:24, Genna

[fpc-devel] Why debugger does not "step in"?

2018-03-23 Thread Gennady Agranov
Hi, I use FPC 3.0.4 / Lazarus 1.8.2 I am seeing the same behavior when I debug the program using Lazarus IDE under Win64 and Linux64 When I want to "step in" into my own function/procedure - GDB simply steps over... If I set a breakpoint inside the function/procedure I want to "step in"

Re: [fpc-devel] Array assignment operator

2018-11-03 Thread Gennady Agranov
Hi, Leaving aside the reason why the MiSchi's solution doesn't work the main question is still not answered :) If you have integer dynamic array "MyArray" is there a way for the following statement to compile and work correctly: MyArray := 5; Thanks, Gennady On 11/3/2018 4:14 PM, Ben

Re: [fpc-devel] Array assignment operator

2018-11-04 Thread Gennady Agranov
ype: text/plain; charset="utf-8" > > On Sat, Nov 3, 2018 at 4:44 PM Gennady Agranov mailto:gennadyagra...@gmail.com>> > wrote: > >> Hi, >> >> Leaving aside the reason why the MiSchi's solution doesn't work the main

Re: [fpc-devel] Array assignment operator

2018-11-04 Thread Gennady Agranov
On 11/4/2018 5:24 PM, Sven Barth via fpc-devel wrote: Am So., 4. Nov. 2018, 20:36 hat Gennady Agranov mailto:gennadyagra...@gmail.com>> geschrieben: On 11/4/2018 11:24 AM, Sven Barth via fpc-devel wrote: Am So., 4. Nov. 2018, 12:23 hat Schindler Karl-Michael mailt

[fpc-devel] Undefined symbol during linking - any suggestions?

2021-09-03 Thread Gennady Agranov via fpc-devel
Hi, I have rather large program that fails to link - "Undefined symbol: .Lj3016" The only difference with previous cases when link was successful is that I added "indylaz" package - not sure if there is a connection... What can I do or try to diagnose/resolve this issue? (9022) Compiling

Re: [fpc-devel] Undefined symbol during linking - any suggestions?

2021-09-08 Thread Gennady Agranov via fpc-devel
On 9/8/2021 2:25 PM, denisgolovan via fpc-devel wrote: >>> Compiler builds release binaries fine. What do you mean - it should work on "trunk"? it is probably "generics" related, and i tried both official releases - 3.2.0 and 3.2.2 - the same sad result I suspect inlining did it as my code

Re: [fpc-devel] Undefined symbol during linking - any suggestions?

2021-09-07 Thread Gennady Agranov via fpc-devel
code to link? Are there some linker arguments I can add that would help? Is it possible to specify some other linker? Thanks, Gennady On 9/4/2021 5:09 AM, Bart via fpc-devel wrote: On Sat, Sep 4, 2021 at 3:26 AM Gennady Agranov via fpc-devel wrote: IIRC then there were som bugs regarding

Re: [fpc-devel] Undefined symbol during linking - any suggestions?

2021-09-07 Thread Gennady Agranov via fpc-devel
-devel wrote: On Sat, Sep 4, 2021 at 3:26 AM Gennady Agranov via fpc-devel wrote: IIRC then there were som bugs regarding optimization in win64. You can try to compile with optimizations disabled: -O- (or use the Lazarus dialog to do so). ___ fpc-devel

[fpc-devel] RTTI status in 3.2.0 and 3.2.2

2021-09-17 Thread Gennady Agranov via fpc-devel
Hi, I have Delphi RTTI code that takes record's type info, finds method and calls it... The code does not seem to work in 3.2.0 (SEGV) Should it work? Should I try 3.2.2 or there are other ways to call record method in FPC? Thanks, Gennady

Re: [fpc-devel] RTTI status in 3.2.0 and 3.2.2

2021-09-22 Thread Gennady Agranov via fpc-devel
Cool! Thanks! Gennady On 9/20/2021 11:53 AM, Ryan Joseph via fpc-devel wrote: On Sep 19, 2021, at 7:01 AM, Sven Barth via fpc-devel wrote: No, this is not yet supported, but it's a work in progress, but it will arrive the earliest with 3.4 which is not yet planned. We're nearly