Re: [fpc-pascal] Constants in generics tests

2019-02-15 Thread Ryan Joseph
> On Feb 15, 2019, at 4:19 PM, Sven Barth via fpc-pascal > wrote: > > It could be that the method body is not generated. Look for > generate_specialization_procs in pgenutil as that is what generates the > bodies at the end of a unit (simplified). > Really good catch Sven. tstoreddef.is_s

Re: [fpc-pascal] StrUtils unit needs Widestring funcs

2019-02-15 Thread Michael Van Canneyt
On Fri, 15 Feb 2019, Sven Barth via fpc-pascal wrote: Am Fr., 15. Feb. 2019, 18:54 hat Michael Van Canneyt geschrieben: I intend to copy it to ustrutils, which will be compiled with widestrings. Copying all routines to handle ansi/wide string is no solution. I hope you mean UnicodeStrin

Re: [fpc-pascal] Constants in generics tests

2019-02-15 Thread Jeppe Johansen
Hi, Do you know why this doesn't work? type   TGPIO = class   public     class function ReadValue: NativeUInt; virtual; abstract;     class procedure SetValue(AValue: NativeUInt); virtual; abstract;     class function GetPin(const AIndex: NativeInt): boolean; virtual;   end;   generic TStm32GP

Re: [fpc-pascal] building compiler failed

2019-02-15 Thread Jonas Maebe
On 15/02/19 22:16, Ryan Joseph wrote: Resending this because I sent to wrong list and it seems stalled anyways. Checked out revision 41319 today and got this error. Did I do something wrong or is it bug? /usr/local/lib/fpc/3.0.4/ppc386 -Ur -dFPC_USE_LIBC -Ur -Xs -O2 -n -Fi../inc -Fi../x86_64

Re: [fpc-pascal] Constants in generics tests

2019-02-15 Thread Sven Barth via fpc-pascal
Am Fr., 15. Feb. 2019, 21:54 hat Ryan Joseph geschrieben: > > > > On Feb 15, 2019, at 2:11 PM, Ryan Joseph > wrote: > > > > Something with class functions in particular. Very strange it can’t find > the declaration. So never mind about submitting, I need to fix this now. :) > > I just looked ove

[fpc-pascal] building compiler failed

2019-02-15 Thread Ryan Joseph
Resending this because I sent to wrong list and it seems stalled anyways. Checked out revision 41319 today and got this error. Did I do something wrong or is it bug? /usr/local/lib/fpc/3.0.4/ppc386 -Ur -dFPC_USE_LIBC -Ur -Xs -O2 -n -Fi../inc -Fi../x86_64 -Fi../unix -Fi../bsd -Fi../bsd/x86_64 -F

Re: [fpc-pascal] Constants in generics tests

2019-02-15 Thread Ryan Joseph
> On Feb 15, 2019, at 2:11 PM, Ryan Joseph wrote: > > Something with class functions in particular. Very strange it can’t find the > declaration. So never mind about submitting, I need to fix this now. :) I just looked over this and indeed I have no idea idea what happened. I suspect there’s

Re: [fpc-pascal] Constants in generics tests

2019-02-15 Thread Sven Barth via fpc-pascal
Am Fr., 15. Feb. 2019, 20:58 hat Ryan Joseph geschrieben: > > > > On Feb 15, 2019, at 2:11 PM, Ryan Joseph > wrote: > > > > Also I just noticed that I’m getting warnings from the “U” constant > which is declared in the “strict private” section (Private const > "TTest$1.U" never used). That needs

Re: [fpc-pascal] Constants in generics tests

2019-02-15 Thread Ryan Joseph
> On Feb 15, 2019, at 2:11 PM, Ryan Joseph wrote: > > Also I just noticed that I’m getting warnings from the “U” constant which is > declared in the “strict private” section (Private const "TTest$1.U" never > used). That needs to be fixed also. Sven or some other compiler guy, do you > know

Re: [fpc-pascal] Constants in generics tests

2019-02-15 Thread Ryan Joseph
Good catch, I have no idea what broke or how that could have happened. I got it distilled down to this: type generic TTest = class class procedure DoThis; // <—— Forward declaration not solved "class DoThis;" end; class procedure TTest.DoThis; begin end; type ATest = specia

Re: [fpc-pascal] StrUtils unit needs Widestring funcs

2019-02-15 Thread Sven Barth via fpc-pascal
Am Fr., 15. Feb. 2019, 18:54 hat Michael Van Canneyt geschrieben: > > I intend to copy it to ustrutils, which will be compiled with widestrings. > Copying all routines to handle ansi/wide string is no solution. > I hope you mean UnicodeString? The only platform where this is important is Windows

Re: [fpc-pascal] StrUtils unit needs Widestring funcs

2019-02-15 Thread Michael Van Canneyt
I intend to copy it to ustrutils, which will be compiled with widestrings. Copying all routines to handle ansi/wide string is no solution. Michael. On Fri, 15 Feb 2019, AlexeyT wrote: According to one of new issues, StrUtils misses many funcs for UnicodeString: RPos, RPosEx Maybe someone

[fpc-pascal] StrUtils unit needs Widestring funcs

2019-02-15 Thread AlexeyT
According to one of new issues, StrUtils misses many funcs for UnicodeString: RPos, RPosEx Maybe someone here can help to write. (In CudaText project I had a bug, when i used RPos on Russian text and got too big result). -- Regards, Alexey ___ f

[fpc-pascal] Constants in generics tests

2019-02-15 Thread Ryan Joseph
Here’s the latest changes which fixed the constant type checking and includes some tests. Are the tests in the correct format? They are named tgenconst*.pp. https://github.com/genericptr/freepascal/tree/generic_constants For example: {%FAIL} {$mode objfpc} program tgenconst8; type gener

Re: [fpc-pascal] Documentation typo

2019-02-15 Thread Michael Van Canneyt
On Fri, 15 Feb 2019, Marco Borsari via fpc-pascal wrote: In the online html documentation, in the Programmer's Guide, at 1.2.4, it reads: "If it is + (the default) then the compiler will only evaluate as many terms as are necessary to determine the result of the complete expression." Obviously

[fpc-pascal] Documentation typo

2019-02-15 Thread Marco Borsari via fpc-pascal
In the online html documentation, in the Programmer's Guide, at 1.2.4, it reads: "If it is + (the default) then the compiler will only evaluate as many terms as are necessary to determine the result of the complete expression." Obviously it should be "If it is - (the default)" Regards, Marco -- Si