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

Ondrej Pokorny lazarus at kluug.net
Wed Jul 3 09:55:31 CEST 2019


On 03.07.2019 02:37, J. Gareth Moreton wrote:
> On 03/07/2019 01:13, Ondrej Pokorny wrote:
>> On 02.07.2019 23:34, Jonas Maebe wrote:
>>> As to your patch itself: why do you not directly compare the 
>>> tconstexprint values directly, and use the svalue/uvalue fields 
>>> instead?
>>
>> Because I missed that they can be directly compared directly.
>
> I dare say, I would advise you make any new changes to my 
> "AS-IS-enum-04.patch", since that adds an internal error to one of the 
> case blocks (mostly to suppress a compiler warning) and ensures it 
> merges cleanly with the trunk.
>
Of course I would do it if I decided to work on it. But no, I won't work 
on the compiler bugs/extension/anything any more. It's just a waste of time.

One reason is that I don't see any reasonable philosophy behind it. As a 
result FPC is a mixture of Delphi compatibilities and incompatibilities, 
applied optimizations and missing optimizations, applied extensions and 
missing extensions that even contradict one another sometimes. I see FPC 
as a personal project of the compiler team who has an absolute right of 
taking decisions about it. So I just accept it as-is.

The second reason is that the compiler people are very busy (which I 
perfectly understand) and it's hard to get some feedback even when 
fixing bugs.

On the other hand it's not that bad all in all. FPC still is a good 
compiler and I prefer it over Delphi. And I have the source code of it, 
so if it really matters, I can patch it for myself.

Ondrej



More information about the fpc-devel mailing list