Re: [fpc-devel] Record types with unbounded trailing data

2019-06-23 Thread J. Gareth Moreton
Well, that's when I said that a new keyword may be necessary so there's no ambiguity, but in this case, for a single open array, the two are effectively equivalent.  Even in cases where you might pass the array through the Move routine, you wouldn't do it for the entire record (or an array of

Re: [fpc-devel] Record types with unbounded trailing data

2019-06-23 Thread Sven Barth via fpc-devel
Am 24.06.2019 um 05:57 schrieb J. Gareth Moreton: We can't really use a new keyword to define an unbounded array, so I'm wondering if we can work with the syntax for open arrays.  For example, say we redefined LOGPALETTE to the following: LOGPALETTE = record   palVersion : WORD;  

Re: [fpc-devel] Inlining problem and LEB128

2019-06-23 Thread J. Gareth Moreton
Fair enough - thank you for the insight. To clarify, it is easy enough to demand "inline" appear in the interface section, but it breaks a lot of pre-existing code.  I'll have a think about how to implement the alternative solution of "implementation-only inline" only affecting the routine

Re: [fpc-devel] Record types with unbounded trailing data

2019-06-23 Thread J. Gareth Moreton
Thought I'd ask.  Nothing lost.  Just seeking a consensus on how to address the problem. Gareth On 24/06/2019 05:41, Michael Van Canneyt wrote: On Mon, 24 Jun 2019, J. Gareth Moreton wrote: Hi everyone, So after a problem over at https://bugs.freepascal.org/view.php?id=35753 that led to

Re: [fpc-devel] Record types with unbounded trailing data

2019-06-23 Thread Michael Van Canneyt
On Mon, 24 Jun 2019, J. Gareth Moreton wrote: Hi everyone, So after a problem over at https://bugs.freepascal.org/view.php?id=35753 that led to a change of https://bugs.freepascal.org/view.php?id=35671 , it became apparent that there may need to be better support for unbounded arrays in

[fpc-devel] Record types with unbounded trailing data

2019-06-23 Thread J. Gareth Moreton
Hi everyone, So after a problem over at https://bugs.freepascal.org/view.php?id=35753 that led to a change of https://bugs.freepascal.org/view.php?id=35671 , it became apparent that there may need to be better support for unbounded arrays in record types - not open arrays, but unbounded ones.

Re: [fpc-devel] Inlining problem and LEB128

2019-06-23 Thread J. Gareth Moreton
Ah, found it.  It was buried in the "noise" and me having a bit of a bad time mentally at the time. https://bugs.freepascal.org/view.php?id=35346 The patches in that issue fix the inlined methods for compiler/cstreams.pas and compiler/entfile.pas so that "inline" appears in the interface

Re: [fpc-devel] Inlining problem and LEB128

2019-06-23 Thread J. Gareth Moreton
That's a point, true.  I've been for openness a lot lately, and one doesn't normally distribute the PPU files with a closed-source project, but I guess for those programs that need compiling on Linux before they can be run, it's not very desirable if the PPU files contain information on, say,

Re: [fpc-devel] Inlining problem and LEB128

2019-06-23 Thread Florian Klämpfl
Am 23. Juni 2019 16:05:05 schrieb Jonas Maebe : > On 23/06/2019 01:10, J. Gareth Moreton wrote: > >> Currently, you can get away with specifying the "inline" directive for a >> function in just the implementation section of a unit, and the function >> will be inlined. However, in some

Re: [fpc-devel] Inlining problem and LEB128

2019-06-23 Thread Jonas Maebe
On 23/06/2019 01:10, J. Gareth Moreton wrote: > Currently, you can get away with specifying the "inline" directive for a > function in just the implementation section of a unit, and the function > will be inlined.  However, in some situations, this can cause compiler > crashes which I believe is

Re: [fpc-devel] Inlining problem and LEB128

2019-06-23 Thread Sven Barth via fpc-devel
Am 23.06.2019 um 01:10 schrieb J. Gareth Moreton: This one is for Jonas in particular, but also to address a minor issue in general. Currently, you can get away with specifying the "inline" directive for a function in just the implementation section of a unit, and the function will be