Re: [fpc-devel] Copy() and ZeroBaseStrings

2025-04-08 Thread Sven Barth via fpc-devel
Bart via fpc-devel schrieb am Di., 8. Apr. 2025, 22:20: > On Tue, Apr 8, 2025 at 12:09 AM Sven Barth via fpc-devel > wrote: > > > >> > Please report a bug. > >> Done: https://gitlab.com/freepascal.org/fpc/source/-/issues/41228 > > > > > > Tur

Re: [fpc-devel] Copy() and ZeroBaseStrings

2025-04-07 Thread Sven Barth via fpc-devel
Bart via fpc-devel schrieb am Mo., 7. Apr. 2025, 19:40: > On Mon, Apr 7, 2025 at 8:17 AM Sven Barth via fpc-devel > wrote: > > > > Please report a bug. > Done: https://gitlab.com/freepascal.org/fpc/source/-/issues/41228 Turns out I had been too eager to request a bug

Re: [fpc-devel] Copy() and ZeroBaseStrings

2025-04-07 Thread Sven Barth via fpc-devel
Martin Frb via fpc-devel schrieb am Mo., 7. Apr. 2025, 08:13: > On 07/04/2025 08:01, Sven Barth via fpc-devel wrote: > > > > Also it would be best to simply document as UTF8Copy working 1-based > > because you can't detect from the callee-side whether it had been >

Re: [fpc-devel] Copy() and ZeroBaseStrings

2025-04-06 Thread Sven Barth via fpc-devel
Bart via fpc-devel schrieb am So., 6. Apr. 2025, 23:19: > Hi, > > Is this a known issue? > === > program z; > > {$longstrings on} > {$zerobasedstrings on} > > var > S, T: string; > begin > S := 'ABC'; > write('S[0]= "',S[0],'"'); > if (S[0] <> 'A') then writeln(', FAIL: expected:

Re: [fpc-devel] Wrong version of db.pas in the fixes_3_2 branch?

2025-04-05 Thread Sven Barth via fpc-devel
Michael Roland via fpc-devel schrieb am Di., 1. Apr. 2025, 02:24: > Is the wrong version of the db.pas in fixes_3_2 branch? > No. > > > The current version of db.pas in fixes_3_2 seems to be from the 3.3.1 > branch instead of the 3.2.3 branch. > There have been changes from 3.3.1 that have bee

Re: [fpc-devel] Overridden method with different signature - compiles - should it?

2025-04-05 Thread Sven Barth via fpc-devel
Martin Frb via fpc-devel schrieb am Sa., 5. Apr. 2025, 12:02: > See the below code. (tested 3.2.3 and 3.3.1) > > Is this intentionally allowed? > > Technically it should work. TSubTest.Test always returns something that > fits the inherited requirement. > > > program Project1; > type >TFoo =

Re: [fpc-devel] class of nested.class ?

2025-04-03 Thread Sven Barth via fpc-devel
Martin Frb via fpc-devel schrieb am Do., 3. Apr. 2025, 21:35: > "class of" can use qualified identifiers. It works with "unit.classname". > > But it can't be used on a class nested in another container? > (same if TFoo is advanced record) > > Is that intentional? > > program Project1; > type >

Re: [fpc-devel] Fix compile error for armv6m target

2025-01-08 Thread Sven Barth via fpc-devel
Am 09.01.2025 um 00:00 schrieb Michael Ring via fpc-devel: There's a syntax error that is in trunk for a while now, here's the fix, can anybody of the dev's please apply this? Applied. Thanks for finding this... Regards, Sven ___ fpc-devel maillist

Re: [fpc-devel] Forward Record

2024-12-05 Thread Sven Barth via fpc-devel
Amir via fpc-devel schrieb am Do., 5. Dez. 2024, 00:57: > I wonder why? Is there any technical difference between classes and > records for the purpose of forward declaration? > Yes, there is. Classes are implicit pointer types, thus when you have a field that is of type class then it's size w

Re: [fpc-devel] Thread and process count during compilation?

2024-11-12 Thread Sven Barth via fpc-devel
Martin Frb via fpc-devel schrieb am Di., 12. Nov. 2024, 11:12: > Following up some question on the forum: > > https://forum.lazarus.freepascal.org/index.php/topic,69149.msg537855.html#msg537855 > > I wanted to confirm one of my assumptions. > > If I start compiling a project (on any single file w

Re: [fpc-devel] THashMap or similar with ansistring as key

2024-11-09 Thread Sven Barth via fpc-devel
Am 09.11.2024 um 17:19 schrieb Martin Frb via fpc-devel: Google didn't deliver an answer... If I do    specialize TDictionary    specialize T{Fast}HashMap will it actually has the string content? Or is the string the address in the string variable => and therefore 2 strings with the same text

Re: [fpc-devel] RTL make shared

2024-10-30 Thread Sven Barth via fpc-devel
Adriaan van Os via fpc-devel schrieb am Mi., 30. Okt. 2024, 06:50: > Sven Barth via fpc-devel wrote: > > Adriaan van Os via fpc-devel > <mailto:fpc-devel@lists.freepascal.org>> schrieb am Di., 29. Okt. 2024, > > 15:47: > > The idea of building the RTL in a d

Re: [fpc-devel] RTL make shared

2024-10-29 Thread Sven Barth via fpc-devel
Adriaan van Os via fpc-devel schrieb am Di., 29. Okt. 2024, 15:47: > Sven Barth via fpc-devel wrote: > > Adriaan van Os via fpc-devel > <mailto:fpc-devel@lists.freepascal.org>> schrieb am Di., 29. Okt. 2024, > > 11:29: > > > > Trying to build the FPC

Re: [fpc-devel] RTL make shared

2024-10-29 Thread Sven Barth via fpc-devel
Adriaan van Os via fpc-devel schrieb am Di., 29. Okt. 2024, 11:29: > Trying to build the FPC RTL as a dynamic library on MacOS (with make > shared), I run into several > problems > I don't know when that was tested last in any platform... > 2. When I do the linking pass by hand, ld complains a

Re: [fpc-devel] virtual override with diff in default ?

2024-10-22 Thread Sven Barth via fpc-devel
Martin Frb via fpc-devel schrieb am Di., 22. Okt. 2024, 23:28: > Is the below meant to be allowed? > It compiles, it also compiles if you have no default in the base, but a > default in the sub class. > > type >TFoo = class > procedure Bar (const Item: String; AnObject: TObject = nil); v

Re: [fpc-devel] soft-fpu

2024-07-10 Thread Sven Barth via fpc-devel
Martin Frb via fpc-devel schrieb am Mi., 10. Juli 2024, 19:21: > Any hints on using unit SoftFpu? (or any alternative) > > I have an 80 bit float (from an external source) that needs to be > converted to double. > > But if I do >uses softfpu, ufloatx80 > > then I get >Error: Multiple defi

Re: [fpc-devel] Concatenating huge AnsiStrings

2024-06-28 Thread Sven Barth via fpc-devel
Virgo Pärna via fpc-devel schrieb am Fr., 28. Juni 2024, 08:41: > On Fri, 21 Jun 2024 20:03:56 +0200, Marco van de Voort via fpc-devel < > fpc-devel@lists.freepascal.org> wrote: > > Probably terminate with a heap out of memory error. > > Also depends of platform... > > program tests; > var > s,

Re: [fpc-devel] Windows for AArch64

2024-05-26 Thread Sven Barth via fpc-devel
J. Gareth Moreton via fpc-devel schrieb am Sa., 25. Mai 2024, 22:18: > Indeed - I'm not giving up! I installed Clang via LLVM. Which of the EXE > files is actually the assembler? It's not entirely clear (no "clang-as", > for example). (Although I trust it works!) > Simply check what FPC call

Re: [fpc-devel] Windows for AArch64

2024-05-25 Thread Sven Barth via fpc-devel
J. Gareth Moreton via fpc-devel schrieb am Sa., 25. Mai 2024, 10:49: > Thought I'd give a small update. > > I was distracted over the past month with work, the arm-linux blocking > bug and a couple of merge requests which were much easier to develop! > I'm now having a solid bash at getting Windo

Re: [fpc-devel] {$i ascdef.inc} / stdcall

2024-05-06 Thread Sven Barth via fpc-devel
Martin Frb via fpc-devel schrieb am Mo., 6. Mai 2024, 14:11: > Maybe of interest? > > The include file {$i ascdef.inc} is used from unit Windows with > {$calling stdcall} > in effect. > > Most functions in it therefore don't have "stdcall". But some do. Is > that known/wanted/...? > > Similar in

Re: [fpc-devel] apple properties // Re: Help/Guidance please: Dwarf support for properties

2024-05-03 Thread Sven Barth via fpc-devel
Martin Frb via fpc-devel schrieb am Fr., 3. Mai 2024, 12:13: > In case it goes ahead, I am trying to thing of what would be needed > Can anyone think of any feature for Pascal properties that is not > covered by the below? > A property can be marked "default". Currently only array properties

Re: [fpc-devel] Windows for AArch64

2024-04-29 Thread Sven Barth via fpc-devel
Am 29.04.2024 um 08:42 schrieb J. Gareth Moreton via fpc-devel: Aah, partially answered.  It's not supported in 3.2.2, but there is better support for it in the trunk. You had me worried there for a moment that someone regenerated the makefiles with an older version of fpcmake... ^^' Anyway,

Re: [fpc-devel] Free Pascal for Windows aarch64 Bug Bounties

2024-04-27 Thread Sven Barth via fpc-devel
J. Gareth Moreton via fpc-devel schrieb am Sa., 27. Apr. 2024, 10:00: > You've piqued my interest. I currently only have the ability to develop > on aarch64-linux (Raspberry Pi 400), but I'm curious to know if I can get a > version of Windows to run on it, even if the performance will be very ba

Re: [fpc-devel] Operator overloading question: Impossible to overload assignment for equal types. Why?

2024-04-25 Thread Sven Barth via fpc-devel
Bart via fpc-devel schrieb am Do., 25. Apr. 2024, 11:48: > > > Then declare a Copy management operator in the record. Unlike an > assignment operator these *must* be part of the record, thus the same rules > are applied for the same type everywhere unlike for operator overloads. See > also https:

Re: [fpc-devel] Operator overloading question: Impossible to overload assignment for equal types. Why?

2024-04-25 Thread Sven Barth via fpc-devel
Bart via fpc-devel schrieb am Mi., 24. Apr. 2024, 11:59: > Overloading the := (assignment) operator for equal types is forbidden. > Out of curiosity I would like to know why that is? > If there exists a built-in operator then overloading that operator is forbidden to avoid confusion when what op

Re: [fpc-devel] Modifiers...

2024-02-01 Thread Sven Barth via fpc-devel
Am 29.01.2024 um 21:56 schrieb Michael Van Canneyt via fpc-devel: I didn't say I cannot think of a legitimate use. I said it does not make sense to me, as in "I don't understand what people try to accomplish with this modifier". Unfortunately I still don't understand after your explanation what

Re: [fpc-devel] Modifiers...

2024-01-29 Thread Sven Barth via fpc-devel
Am 29.01.2024 um 21:18 schrieb Michael Van Canneyt via fpc-devel: On Mon, 29 Jan 2024, Sven Barth via fpc-devel wrote: Am 28.01.2024 um 12:14 schrieb Michael Van Canneyt via fpc-devel: 2) Is there, or has there once been? (found in the synedit highlighter)   final final comes after

Re: [fpc-devel] Modifiers...

2024-01-29 Thread Sven Barth via fpc-devel
Am 28.01.2024 um 12:14 schrieb Michael Van Canneyt via fpc-devel: 2) Is there, or has there once been? (found in the synedit highlighter)   final final comes after virtual/dynamic. Its supposed to stop you from overriding a method. Which is a bit strange because then you should not declar

Re: [fpc-devel] Modifiers...

2024-01-29 Thread Sven Barth via fpc-devel
Am 24.01.2024 um 23:29 schrieb Martin Frb via fpc-devel: https://www.freepascal.org/docs-html/ref/refsu3.html Is this list complete/correct? 1) It lists bitpacked, but     program foo; var  bitpacked: integer;  begin end; gives an error. I thought modifiers can be used as var names? "bitpack

Re: [fpc-devel] WordBool or SmallInt ?

2023-12-29 Thread Sven Barth via fpc-devel
Martin Frb via fpc-devel schrieb am Fr., 29. Dez. 2023, 20:38: > fpc 3.2.3 > The below prog prints 3 times: 11, -1 (signed values) > > https://www.freepascal.org/docs-html/current/ref/refsu4.html#x26-250003.1.1 > > Free Pascal also supports the ByteBool, WordBool, LongBool and QWordBool > type

Re: [fpc-devel] Accidental file inclusion in repository

2023-11-29 Thread Sven Barth via fpc-devel
Am 29.11.2023 um 09:36 schrieb J. Gareth Moreton via fpc-devel: Hi everyone, I hate to point fingers, but there's a 0-byte file named "HEAD" in the repository, which causes git to throw a tantrum sometimes - it was introduced in the following commit: commit a4c324ee237674950e4675894df386519b

Re: [fpc-devel] Build error, main branch, compiler/options.pas 889:33

2023-11-11 Thread Sven Barth via fpc-devel
drichards--- via fpc-devel schrieb am Sa., 11. Nov. 2023, 08:22: > I am getting an incorrect type error at line 889 column 33 in > compiler/options.pas. This is the , following the parameter More to the > function Copy. More is defined as a String. I do not understand why the > function C

Re: [fpc-devel] Maybe room for better documentation? open array as var param

2023-07-20 Thread Sven Barth via fpc-devel
Michael Van Canneyt via fpc-devel schrieb am Do., 20. Juli 2023, 19:24: > > > On Thu, 20 Jul 2023, Martin Frb via fpc-devel wrote: > > > For const param, it is well documented that the value (that includes the > > variable that is passed) must not be changed. > > > > But for "var param"? > > > >

Re: [fpc-devel] "Ordinal expression expected" awkwardness

2023-07-19 Thread Sven Barth via fpc-devel
J. Gareth Moreton via fpc-devel schrieb am Mi., 19. Juli 2023, 19:53: > Hi everyone, > > So I've come across a bit of awkwardness with the compiler. I'm not > sure if it's a well-defined rule that I've overlooked, but in a > for-loop, you can't use a 64-bit control variable when compiling for >

Re: [fpc-devel] DW_AT_external and other additions to FPC generated dwarf

2023-03-28 Thread Sven Barth via fpc-devel
Martin Frb via fpc-devel schrieb am So., 26. März 2023, 16:50: > It also would fall short, if ever Fpc did what Delphi did: > {$ZEROBASEDSTRINGS } > Though, maybe that is a "wont ever happen". > FPC supports that directive since at least 3.2.0 (though apparently it was forgotten to be documented

Re: [fpc-devel] Is this supposed to work (generic)?

2023-03-27 Thread Sven Barth via fpc-devel
Am 26.03.2023 um 13:30 schrieb Martin Frb via fpc-devel: 3.2.3 and 3.3.1 on Win 64bit Trying a generic linked list. So the specialized class must have an entry for the "next" element. And that entry is of the same type as the class itself. Now at first, this seems to be not possible using gen

Re: [fpc-devel] Inconsistency in generics ?

2023-03-03 Thread Sven Barth via fpc-devel
Martin Frb via fpc-devel schrieb am Fr., 3. März 2023, 12:55: > To me the below behaviour appears inconsistent. > But before I file a bug, I want to double check, if maybe this is > intention > > Tested with 3.2.3 and 3.3.1 > > Apparently > - when the generic TGen is compiled, it does check

Re: [fpc-devel] Curious about the effect of all the new optimizations....

2023-03-01 Thread Sven Barth via fpc-devel
J. Gareth Moreton via fpc-devel schrieb am Mi., 1. März 2023, 12:25: > My peephole optimisations mostly save only a handful of cycles each time > which probably won't add up to much for a relatively short test. The > most major optimisation I can think of, although I'm not quite sure when > it w

Re: [fpc-devel] Additional generic type constraints

2023-02-22 Thread Sven Barth via fpc-devel
Kostas Michalopoulos via fpc-devel schrieb am Mi., 22. Feb. 2023, 10:37: > > Because Delphi doesn't have them and when constraints were implemented > > they were implemented for Delphi compatibility. > > Can they be added? The original announcement ~13 years ago mentioned > that those could be ad

Re: [fpc-devel] Additional generic type constraints

2023-02-20 Thread Sven Barth via fpc-devel
Hairy Pixels via fpc-devel schrieb am So., 19. Feb. 2023, 03:54: > As a follow up to my other question, why doesn’t FPC support more types > for generic type constraints, like Pointer, Integer, String etc...? > Especially since we have implicit function specialization now allowing the > user to c

Re: [fpc-devel] Question on constref

2023-02-02 Thread Sven Barth via fpc-devel
Ondrej Pokorny via fpc-devel schrieb am Do., 2. Feb. 2023, 12:09: > Delphi cannot do it. FPC rocks! > > The only disadvantage is that you get a FreeAndNil copy for every type > you pass into the parameter (?) > > Do we want to change it in SysUtils? :) > As you might have noticed you need to add

Re: [fpc-devel] Question on constref

2023-02-02 Thread Sven Barth via fpc-devel
Ondrej Pokorny via fpc-devel schrieb am Do., 2. Feb. 2023, 10:06: > On 02.02.2023 07:42, Sven Barth via fpc-devel wrote: > > The case when you *need* a constant reference. Case in point: the > > passing of TGuid in IInterface.QueryInterface. Delphi code relies on > > it b

Re: [fpc-devel] Question on constref

2023-02-02 Thread Sven Barth via fpc-devel
Adriaan van Os via fpc-devel schrieb am Do., 2. Feb. 2023, 09:57: > Sven Barth wrote: > > Adriaan van Os via fpc-devel > <mailto:fpc-devel@lists.freepascal.org>> schrieb am Do., 2. Feb. 2023, > > 02:47: > > > > Sven Barth via fpc-devel wrote: > &

Re: [fpc-devel] Question on constref

2023-02-01 Thread Sven Barth via fpc-devel
Adriaan van Os via fpc-devel schrieb am Do., 2. Feb. 2023, 02:47: > Sven Barth via fpc-devel wrote: > > > There is no full documentation for that parameter modifier (someone > > might want to file a bug report for that), but the documentation for > > “const” ( > >

Re: [fpc-devel] Question on constref

2023-02-01 Thread Sven Barth via fpc-devel
Am 02.02.2023 um 02:09 schrieb Hairy Pixels: On Feb 2, 2023, at 4:38 AM, Sven Barth wrote: Which types are passed by-value or by-reference when using const is determined by the size of the record and the types of the fields based on whatever the corresponding ABI defines (e.g. the x86_64

Re: [fpc-devel] Question on constref

2023-02-01 Thread Sven Barth via fpc-devel
Am 01.02.2023 um 11:30 schrieb Bart via fpc-devel: I thought that constref would be OK for that (the word constref suggests to me tah the paramter will be treated (by me) to be a constant, and that it shall be passed by reference in all cases, whereas with a const parameter the compiler decides u

Re: [fpc-devel] Question on constref

2023-02-01 Thread Sven Barth via fpc-devel
Am 01.02.2023 um 15:40 schrieb Hairy Pixels via fpc-devel: On Feb 1, 2023, at 8:27 PM, Michael Van Canneyt via fpc-devel wrote: That's exactly what Adriaan is saying. With const the compiler can choose. With constref, you force it not to copy. But this is not so efficient for small parameter

Re: [fpc-devel] Why: "Can't take the address of constant expressions" here?

2023-01-12 Thread Sven Barth via fpc-devel
Am 13.01.2023 um 01:05 schrieb Bart via fpc-devel: The issue is indeed the conversion from UnicodeString to WideString which is not allowed for a var/out parameter. That the compiler doesn't use the error “Call by var for arg no. 3 has to match exactly: Got "UnicodeString" expected "WideString"”

Re: [fpc-devel] Why: "Can't take the address of constant expressions" here?

2023-01-12 Thread Sven Barth via fpc-devel
Am 11.01.2023 um 23:58 schrieb Bart via fpc-devel: Given the following program (an excerpt form a test program for a bugreport about the fpwidestring unit): === program test; {$codepage utf8} {$mode objfpc} {$h+} uses FpWideString; var WSource: WideString = 'source'; USource: UnicodeS

Re: [fpc-devel] Unicode RTL for FPC

2023-01-07 Thread Sven Barth via fpc-devel
Michael Van Canneyt via fpc-devel schrieb am Sa., 7. Jan. 2023, 12:46: > > > On Sat, 7 Jan 2023, Mattias Gaertner via fpc-devel wrote: > > > On Fri, 6 Jan 2023 18:05:43 +0100 (CET) > > Michael Van Canneyt via fpc-devel > > wrote: > > > >> [...] > >> For those that wish to help in testing: > >> >

Re: [fpc-devel] Make file questions (Makefile.fpc, fpmake.pp, etc)

2023-01-03 Thread Sven Barth via fpc-devel
Wayne Sherman schrieb am Mi., 4. Jan. 2023, 01:13: > On Tue, Jan 3, 2023 at 12:17 AM Sven Barth wrote: > >> 1) How do I generate the fpmake.pp file? Or is it created by manual > coding? > > > > This is created manually and is *the* source for how to build a package.

Re: [fpc-devel] Make file questions (Makefile.fpc, fpmake.pp, etc)

2023-01-03 Thread Sven Barth via fpc-devel
Wayne Sherman via fpc-devel schrieb am Di., 3. Jan. 2023, 07:36: > Each package directory (./fpc-source/packages/some-package/) typically > has these files: >fpmake.pp (where does this come from?) >Makefile (this is generated by FPCMake?) >Makefile.fpc (config file for FPCMake to c

Re: [fpc-devel] threads vs widestringmanager / crash

2022-12-20 Thread Sven Barth via fpc-devel
Am 20.12.2022 um 15:08 schrieb Martin: Ok, I don't know too much about the whole initialization But on the off chance of triggering some ideas, I throw in a couple of my thoughts On 19/12/2022 07:42, Sven Barth wrote: Am 07.07.2018 um 15:04 schrieb Martin: So (guessing) the ori

Re: [fpc-devel] threads vs widestringmanager / crash

2022-12-19 Thread Sven Barth via fpc-devel
Ondrej Pokorny via fpc-devel schrieb am Mo., 19. Dez. 2022, 08:30: > On 19.12.2022 07:42, Sven Barth via fpc-devel wrote: > > The RTL assumes that it does not have to deal with threads during the > > initialization of the System unit. So even if the symptom of the crash >

Re: [fpc-devel] threads vs widestringmanager / crash

2022-12-18 Thread Sven Barth via fpc-devel
Am 07.07.2018 um 15:04 schrieb Martin: So (guessing) the original issue may be due to the debugger. The debugger interrupts the target early on. And that does create a thread in the target. If such an external thread happens, would fcp execute the code in question? This is likely to be the ca

Re: [fpc-devel] Progress on pure functions

2022-12-15 Thread Sven Barth via fpc-devel
Am 16.12.2022 um 02:02 schrieb J. Gareth Moreton via fpc-devel: The purity analysis process is very dependent on the node tree being as clean as possible, and so depends on a fair few merge requests that have not yet been approved.  I'm guessing Florian and Jonas and others are somewhat busy, w

Re: [fpc-devel] Progress on pure functions

2022-12-15 Thread Sven Barth via fpc-devel
Am 14.12.2022 um 12:15 schrieb J. Gareth Moreton via fpc-devel: To better explain how purity analysis currently works (I'm sure there's a better name than "purity analysis"), it takes a copy of the unoptimised node tree (this is the same as the tree used for inline, and for a space saving, th

Re: [fpc-devel] Progress on pure functions

2022-12-14 Thread Sven Barth via fpc-devel
J. Gareth Moreton via fpc-devel schrieb am Di., 13. Dez. 2022, 22:09: > The next big milestone that I want to achieve is to make this a pure > function: > > procedure int_str_unsigned(l:longword;out s:shortstring); pure; > var >m1 : longword; >pcstart, >pc2start, >pc,pc2 : pchar;

Re: [fpc-devel] Sorting tests

2022-11-29 Thread Sven Barth via fpc-devel
Ondrej Pokorny via fpc-devel schrieb am Di., 29. Nov. 2022, 11:39: > Am 29.11.2022 um 11:08 schrieb Sven Barth via fpc-devel: > > J. Gareth Moreton via fpc-devel schrieb > am Di., 29. Nov. 2022, 10:09: > >> Surely that's a bug in the comparison functions that

Re: [fpc-devel] Sorting tests

2022-11-29 Thread Sven Barth via fpc-devel
J. Gareth Moreton via fpc-devel schrieb am Di., 29. Nov. 2022, 10:09: > Surely that's a bug in the comparison functions that should be fixed and > not something that can be blamed on introsort. If a comparison function > is faulty, then pretty nuch any sorting algorithm can be considered to > ha

Re: [fpc-devel] Sorting tests

2022-11-28 Thread Sven Barth via fpc-devel
Stefan Glienke via fpc-devel schrieb am Mo., 28. Nov. 2022, 12:39: > In Delphi that would be the > https://docwiki.embarcadero.com/Libraries/Alexandria/en/System.GetTypeKind > intrinsic - I could not find that one in the 3.2.0 feature list. > That one is also supported since 3.2.0, though it see

Re: [fpc-devel] Sorting tests

2022-11-28 Thread Sven Barth via fpc-devel
J. Gareth Moreton via fpc-devel schrieb am Mo., 28. Nov. 2022, 11:01: > Just want to clarify something... if a type is managed, can it be safely > typecast to a pointer in all instances and on all platforms? (The > purpose being so if I wanted to swap two items, so there's no overall > change in

Re: [fpc-devel] Sorting tests

2022-11-27 Thread Sven Barth via fpc-devel
Stefan Glienke via fpc-devel schrieb am Mo., 28. Nov. 2022, 00:20: > Probably not unless FPC has something similar to > > https://docwiki.embarcadero.com/Libraries/Alexandria/en/System.IsManagedType > (that function among a few others is compiletime evaluated). > It's supported since 3.2.0: http

Re: [fpc-devel] An interesting thought... AI

2022-11-10 Thread Sven Barth via fpc-devel
J. Gareth Moreton schrieb am Do., 10. Nov. 2022, 23:26: > Funny how you mention "black box" because recently there was a news > article about scientists increasingly not understanding why machine > learning is working the way it is with apparent patterns of emergent > behaviour. > That and simil

Re: [fpc-devel] An interesting thought... AI

2022-11-10 Thread Sven Barth via fpc-devel
Am 10.11.2022 um 19:10 schrieb J. Gareth Moreton via fpc-devel: Hi everyone, This has been something that has been on my mind for a while now, but with my increasingly more complex optimisations being developed for the Free Pascal Compiler and the code becoming an ever bigger spiderweb of con

Re: [fpc-devel] Policy regarding SHL/SHR under x86

2022-10-24 Thread Sven Barth via fpc-devel
J. Gareth Moreton via fpc-devel schrieb am Mo., 24. Okt. 2022, 13:52: > That's useful - thank you. Michael Van Canneyt mentioend he updated the > documentation for this - where is this usually located? It's not here, > for example: https://www.freepascal.org/docs-html/ref/refsu45.html That is

Re: [fpc-devel] Compile error with actual FPC main and Lazarus main

2022-09-28 Thread Sven Barth via fpc-devel
J. Gareth Moreton via fpc-devel schrieb am Mi., 28. Sep. 2022, 19:44: > Granted I do think the compiler raising an internal exception is rather > unclean... possibly not as bad as in internal error but still something > undesirable. > Well, if you want to hunt down these issues, be my guest; we'

Re: [fpc-devel] M1 and Mac system support?

2022-09-22 Thread Sven Barth via fpc-devel
Richard Hyman via fpc-devel schrieb am Do., 22. Sep. 2022, 09:00: > > 1. Does FPC compile natively for the ARM Macs, specifically an M1? Docs I > found do not directly answer this question (he's thinking about purchasing > an M1 Mac mini). > This is supported since 3.2.2. 2. Does FPC provide

Re: [fpc-devel] Insufficient Dwarf info for Interfaces

2022-09-15 Thread Sven Barth via fpc-devel
Am 15.09.2022 um 14:32 schrieb Martin Frb via fpc-devel: https://gitlab.com/freepascal.org/fpc/source/-/issues/39904 On top of adding the functions in the interface to the dwarf info, it would be great if the compiler could also add some sort of link to the underlaying TObject. So the debugg

Re: [fpc-devel] Smart-linking on linux/x86-64

2022-07-05 Thread Sven Barth via fpc-devel
Joost van der Sluis via fpc-devel schrieb am Di., 5. Juli 2022, 22:37: > > > > Op 05-07-2022 om 08:39 schreef Sven Barth via fpc-devel: > > Joost van der Sluis via fpc-devel > <mailto:fpc-devel@lists.freepascal.org>> schrieb am Di., 5. Juli 2022, > > 0

Re: [fpc-devel] Smart-linking on linux/x86-64

2022-07-04 Thread Sven Barth via fpc-devel
Joost van der Sluis via fpc-devel schrieb am Di., 5. Juli 2022, 00:17: > > But my real issue is this: on Windows, using the internal linker, this > procedure is also omitted *with* Dwarf debug-data. As you implied. > > The problem is, though, that the CFI-information (the FDE) is not > omitted. T

Re: [fpc-devel] Smart-linking on linux/x86-64

2022-07-04 Thread Sven Barth via fpc-devel
Am 04.07.2022 um 19:52 schrieb Joost van der Sluis via fpc-devel: Hi all, I have a very small application, see below. One procedure is not called at all. But when I compile with ppcx64 -XX -CX testcfi.pp The P$TESTCFI_$$_NEVERCALLES symbol is still in the executable. On Windows (internal l

Re: [fpc-devel] Test suite error wrong PPU

2022-06-24 Thread Sven Barth via fpc-devel
Hairy Pixels schrieb am Fr., 24. Juni 2022, 03:45: > > > > On Jun 23, 2022, at 11:52 PM, Sven Barth > wrote: > > > > As you can see at the end (see below) it falls back to 3.2.2 at the end. > What commands did you execute to build FPC itself? > > > >

Re: [fpc-devel] Test suite error wrong PPU

2022-06-23 Thread Sven Barth via fpc-devel
Hairy Pixels via fpc-devel schrieb am Do., 23. Juni 2022, 04:08: > I usually solve this by deleting the units folder but for some reason > after pulling from main it simply won’t build. Can anyone explain why the > PPU version is wrong? It’s all building from the same source directory so > the PP

Re: [fpc-devel] get and putin $modeswitch isooi

2022-06-20 Thread Sven Barth via fpc-devel
Am 03.06.2022 um 14:32 schrieb Marco van de Voort via fpc-devel: There was a question about $modeswitch ISOIO  on stack overflow, and specially why get() and put() are not part of it. The documentation about this switch seems very sparse. As far as I can see it is mostly the lookahead and sw

Re: [fpc-devel] Generic keywords mode switch

2022-06-13 Thread Sven Barth via fpc-devel
Hairy Pixels schrieb am Mo., 13. Juni 2022, 05:30: > Me and Sven had planned this a couple years ago and I finally got around > to it this weekend since it was pretty trivial. The reason for this being > we wanted a way to disable the generic keywords in ObjFPC mode. The > solution is to decouple

Re: [fpc-devel] DEBUG_NODE_XML broken

2022-05-26 Thread Sven Barth via fpc-devel
Am 27.05.2022 um 04:41 schrieb J. Gareth Moreton via fpc-devel: Hi everyone, Building the compiler with -dDEBUG_NODE_XML got broken recently: C:/lazarus/fpc/3.2.0/bin/x86_64-win64/ppcx64.exe -Ur -Xs -O2 -n -Fux86_64 -Fusystems -FuC:/Users/garet/Documents/programming/fpc-opts/rtl/units/x86_64-

Re: [fpc-devel] Functors

2022-05-26 Thread Sven Barth via fpc-devel
Am 26.12.2021 um 02:16 schrieb Blaise--- via fpc-devel: Important design points: 1) Applying round brackets to instances does not collide with the existing syntax; 2) Naturally, helpers are able to turn helpees into functors; 3) Operator () cannot be applied to types -- that would clash with e

Re: [fpc-devel] $modeswitch Closures

2022-05-26 Thread Sven Barth via fpc-devel
Am 25.12.2021 um 20:22 schrieb Blaise--- via fpc-devel: The attached modeswitch_closures.patch introduces {$modeswitch Closures}; it is included in {$mode Delphi}. There is a distinction between anonymous routines (defined in-place, without a name) and closures (capture the context they are in

Re: [fpc-devel] Initialising method pointers with class methods

2022-05-26 Thread Sven Barth via fpc-devel
Am 24.12.2021 um 02:27 schrieb Blaise--- via fpc-devel: DCC allows the subj (provided that the class type is known at compile time), FPC does not. The attached init_methptr_with_classmeth.patch implements this feature. ---8<--- type C = class class procedure Foo; end; class procedu

Re: [fpc-devel] Assigning class methods, accessed via a class reference type, to procvars

2022-05-26 Thread Sven Barth via fpc-devel
Am 22.12.2021 um 19:16 schrieb Blaise--- via fpc-devel: 1) The attached metaclass_meth_to_procvar-1.patch fixes the internal error reported for: [ICE] Assigning class methods, accessed via a class reference type, to incompatible procvars ---8<--- type C = class class procedure NonSt

Re: [fpc-devel] Assigning instance methods, accessed via a type, to method pointers

2022-05-26 Thread Sven Barth via fpc-devel
Am 23.12.2021 um 19:13 schrieb Blaise--- via fpc-devel: Subj silently produces invalid codegen: ---8<--- var Z: procedure of object; type R = record procedure Foo; end; procedure R.Foo; begin end; type O = object procedure Foo; end; procedure O.Foo; begin end; type C = class   

Re: [fpc-devel] Parsing procedural type and method directives

2022-05-26 Thread Sven Barth via fpc-devel
Am 21.12.2021 um 21:37 schrieb Blaise--- via fpc-devel: 1) The following three routines: pdecsub.pas!parse_parameter_dec pdecvar.pas!maybe_parse_proc_directives ptype.pas!read_named_type\procvar_dec create a dummy typesym for the procdef, for the sole purpose of invoking parse_var_pr

Re: [fpc-devel] Thoughts: Make FillChar etc. an intrinsic for specialised performance potential

2022-04-19 Thread Sven Barth via fpc-devel
Stefan Glienke via fpc-devel schrieb am Di., 19. Apr. 2022, 12:38: > If you want to zero small records more efficiently it might be better > using Default(t) for that and looking at optimizing the code the compiler > generates for that as it seems it produces an empty temp variable which it > ass

Re: [fpc-devel] Incompatible assignments but no compile error (char array and shortstring)

2022-04-17 Thread Sven Barth via fpc-devel
Am 16.04.2022 um 22:35 schrieb Wayne Sherman via fpc-devel: Tested with fpc 3.3.1 trunk (as of 2022-Mar-12) and 3.2.2 stable. Ubuntu 20.04 64-bit Good compile time error checking is one of the wonderful things about Pascal. But some char array and shortstring assignments which are not size comp

Re: [fpc-devel] Thoughts: Make FillChar etc. an intrinsic for specialised performance potential

2022-04-17 Thread Sven Barth via fpc-devel
Florian Klämpfl via fpc-devel schrieb am Sa., 16. Apr. 2022, 21:00: > > > > Am 16.04.2022 um 01:26 schrieb J. Gareth Moreton via fpc-devel < > fpc-devel@lists.freepascal.org>: > > > > Hi everyone, > > > > This is something that sprung to mind when thinking about code speed and > the like, and one

Re: [fpc-devel] Thoughts: Make FillChar etc. an intrinsic for specialised performance potential

2022-04-16 Thread Sven Barth via fpc-devel
J. Gareth Moreton via fpc-devel schrieb am Sa., 16. Apr. 2022, 01:33: > Actual Pascal calls to FillChar would not change in any way and so > theoretically it won't break existing code. The only drawback is that > the intrinsic and the internal System functions would have to be named > the same s

Re: [fpc-devel] Thoughts: Make FillChar etc. an intrinsic for specialised performance potential

2022-04-16 Thread Sven Barth via fpc-devel
Benito van der Zander via fpc-devel schrieb am Sa., 16. Apr. 2022, 15:43: > Hi, > > it could always inline it. > > For small sizes do that mov and for large sizes do rep stosb on x86. It is > very fast nowadays. Faster than FillChar on my Intel laptop. (except for > mid sizes like 128 bytes) > F

Re: [fpc-devel] Problems with MM types (__m128 etc).

2022-04-06 Thread Sven Barth via fpc-devel
Am 06.04.2022 um 20:32 schrieb J. Gareth Moreton via fpc-devel: Another problem... I've tried to declare an ADDPD intrinsic as follows: function x86_addpd(r0, r1: __m128d): __m128d; [INTERNPROC: fpc_in_x86_addpd]; I thought using __m128d instead of __m128 was fairly logical since ADDPD works

Re: [fpc-devel] Questions about cross-compiling (z80)

2022-02-12 Thread Sven Barth via fpc-devel
BogDan schrieb am Sa., 12. Feb. 2022, 13:23: > Hi, > > > On Saturday, February 12, 2022, 11:23:40 AM GMT+2, Sven Barth < > pascaldra...@googlemail.com> wrote: > > > BogDan via fpc-devel schrieb am Sa., 12. > Feb. 2022, 10:18: > > Also, everything that is n

Re: [fpc-devel] Questions about cross-compiling (z80)

2022-02-12 Thread Sven Barth via fpc-devel
BogDan via fpc-devel schrieb am Sa., 12. Feb. 2022, 10:18: > Also, everything that is not used by the application it should be stripped > by the linker (if it has one). Again I'd like to highlight that I'm new to > fpc, last time I used pascal it was over 20 years ago :) . > The linker can only

Re: [fpc-devel] Questions about cross-compiling (z80)

2022-02-11 Thread Sven Barth via fpc-devel
BogDan schrieb am Fr., 11. Feb. 2022, 22:20: > Hi, > > > Thanks a lot for your quick reply. > > Adding ihxutil to path fixed the problem. > But the size problem is stil there, a simple 2 lines of code "begin; > end." generates over 32k of code. That code should not generate more than > 8 bytes o

Re: [fpc-devel] Questions about cross-compiling (z80)

2022-02-11 Thread Sven Barth via fpc-devel
Tomas Hajny via fpc-devel schrieb am Fr., 11. Feb. 2022, 17:24: > On 2022-02-11 14:14, Sven Barth via fpc-devel wrote: > > BogDan via fpc-devel schrieb am Fr., > > 11. Feb. 2022, 11:09: > > . > . > >> It seems is an IHX format not tzx > >> Also the

Re: [fpc-devel] Questions about cross-compiling (z80)

2022-02-11 Thread Sven Barth via fpc-devel
BogDan via fpc-devel schrieb am Fr., 11. Feb. 2022, 11:09: > Hello, > > According to https://wiki.freepascal.org/Z80 fpc is able to compile > pascal code for z80. > Sadly I'm a newbie on fpc, therefore I have a few questions: > > 1. I changed a bit the build script from > https://wiki.freepascal.

Re: [fpc-devel] Current state of atari port

2022-02-10 Thread Sven Barth via fpc-devel
Am 11.02.2022 um 03:59 schrieb Karoly Balogh: Hi, On Thu, 10 Feb 2022, Sven Barth via fpc-devel wrote: Thorsten Otto via fpc-devel schrieb am Do., 10. Feb. 2022, 15:47: Cause in the variant you mentioned where would the allocated memory be stored? I'm not that familiar with ObjectGE

Re: [fpc-devel] Current state of atari port

2022-02-10 Thread Sven Barth via fpc-devel
Am 10.02.2022 um 19:22 schrieb Thorsten Otto via fpc-devel: On Donnerstag, 10. Februar 2022 19:13:15 CET Sven Barth via fpc-devel wrote: > And how does one work with the created instance? How does one release it? Do > you have an example for that? Maybe some examples of ObjectGEM

Re: [fpc-devel] Current state of atari port

2022-02-10 Thread Sven Barth via fpc-devel
Thorsten Otto via fpc-devel schrieb am Do., 10. Feb. 2022, 15:47: > On Donnerstag, 10. Februar 2022 14:21:54 CET Sven Barth via fpc-devel > wrote: > > > Anything else does not make sense. > > > > > > Cause in the variant you mentioned where would the allocated me

Re: [fpc-devel] Current state of atari port

2022-02-10 Thread Sven Barth via fpc-devel
Thorsten Otto via fpc-devel schrieb am Do., 10. Feb. 2022, 13:00: > - when constructing objects, ObjectGEM uses contructs like > > new(PGroupBox, init(...) > > Such constructs are not supported by FreePascal, you have to assign the > result to some variable (i think that is also an incompatibilit

Re: [fpc-devel] Questions regarding m68k-atari target

2022-02-07 Thread Sven Barth via fpc-devel
Thorsten Otto via fpc-devel schrieb am Mo., 7. Feb. 2022, 13:00: > In the long term, it would be nice to have some automatic selection of the > correct libraries. Otherwise it will not be possible to produce 68k > binaries with a compiler that was compiled for 68020, since that will still > pull

Re: [fpc-devel] Questions regarding m68k-atari target

2022-01-29 Thread Sven Barth via fpc-devel
Am 29.01.2022 um 09:24 schrieb Thorsten Otto via fpc-devel: On Freitag, 28. Januar 2022 20:21:03 CET Karoly Balogh wrote: > a fixed GAS/LD support would be nice, of > course. Yes, but currently i'm a bit lost here. Since that combination currently does not support "smart linking", i guess i'

  1   2   3   4   5   6   7   8   9   10   >