Re: [fpc-devel] Deeper problem with Internal Error 200309201

2019-07-15 Thread J. Gareth Moreton
So a progress update. I ended up running into some difficulty with the original idea of having a full semantic pass that is run prior to the first pass. For some reason, "pass_semantic" wasn't always executed for every node, and I still haven't figured out why (although it seems to be related

Re: [fpc-devel] [Suggestion] Enumeration range-check intrinsic

2019-07-15 Thread Ben Grasset
On Mon, Jul 15, 2019 at 5:50 PM Michael Van Canneyt wrote: > As far as I know, they are not. I believe that when specializing, the > compiler checks if an identical specialization is in scope: > if so, it uses that. If not, a duplicate is made. > > As far as I know, Delphi behaves the same. > >

Re: [fpc-devel] [Suggestion] Enumeration range-check intrinsic

2019-07-15 Thread Michael Van Canneyt
On Mon, 15 Jul 2019, Ben Grasset wrote: On Mon, Jul 15, 2019 at 5:23 PM Sven Barth via fpc-devel < fpc-devel@lists.freepascal.org> wrote: That is exactly what is happening if you have a specialization in multiple units that don't know about each other. At what point are they being

Re: [fpc-devel] [Suggestion] Enumeration range-check intrinsic

2019-07-15 Thread Ben Grasset
On Mon, Jul 15, 2019 at 5:23 PM Sven Barth via fpc-devel < fpc-devel@lists.freepascal.org> wrote: > That is exactly what is happening if you have a specialization in multiple > units that don't know about each other. > At what point are they being removed so that the executable is not comically

Re: [fpc-devel] [Suggestion] Enumeration range-check intrinsic

2019-07-15 Thread Michael Van Canneyt
On Mon, 15 Jul 2019, Sven Barth via fpc-devel wrote: Ben Grasset schrieb am Mo., 15. Juli 2019, 22:57: On Sat, Jul 13, 2019 at 9:02 PM Sven Barth via fpc-devel < fpc-devel@lists.freepascal.org> wrote: Not necessarily. If you have two units that don't know about each other that specialize

Re: [fpc-devel] [Suggestion] Enumeration range-check intrinsic

2019-07-15 Thread Sven Barth via fpc-devel
Ben Grasset schrieb am Mo., 15. Juli 2019, 22:57: > On Sat, Jul 13, 2019 at 9:02 PM Sven Barth via fpc-devel < > fpc-devel@lists.freepascal.org> wrote: > >> Not necessarily. If you have two units that don't know about each other >> that specialize the function with the same enum then you'd have

Re: [fpc-devel] [Suggestion] Enumeration range-check intrinsic

2019-07-15 Thread Ben Grasset
On Sat, Jul 13, 2019 at 9:02 PM Sven Barth via fpc-devel < fpc-devel@lists.freepascal.org> wrote: > Not necessarily. If you have two units that don't know about each other > that specialize the function with the same enum then you'd have two > specializations already. > Surely that only applies