Re: [fpc-devel] Building from source...

2019-05-12 Thread Sven Barth via fpc-devel
Kevin Lyda schrieb am Mo., 13. Mai 2019, 02:20: > I note that there's a git mirror hosted at > https://github.com/graemeg/freepascal which is kept up to date (last > commit, 17 minutes ago). I want to use it to do two things - first to > test a proposed patch and second on my own systems to

Re: [fpc-devel] modeswitch multihelpers

2019-05-12 Thread Ryan Joseph
> On May 12, 2019, at 4:03 AM, Ondrej Pokorny wrote: > > I'd like to thank Ryan & Sven for extending the helpers to be able to handle > multiple helpers. > > Now I can remove my (obtrusive) helper inheritance > > THelper2 = class helper(THelper1) for TMyObject > > very good! > > This

[fpc-devel] Building from source...

2019-05-12 Thread Kevin Lyda
I note that there's a git mirror hosted at https://github.com/graemeg/freepascal which is kept up to date (last commit, 17 minutes ago). I want to use it to do two things - first to test a proposed patch and second on my own systems to integrate into my ci/cd systems. I note there's a Makefile at

Re: [fpc-devel] [Patch/RFC] Warnings for (in/over)complete case statements

2019-05-12 Thread Martok
Hi, don't get me wrong, I like having something of mine included, but I'm genuinely surprised you used it in the way I designed it. As you said, the warning and code that is actually generated must agree, otherwise they're useless. And there is a huge gap in the definition of the Freepascal

Re: [fpc-devel] [Patch/RFC] Warnings for (in/over)complete case statements

2019-05-12 Thread Jonas Maebe
On 12/05/2019 19:39, Ondrej Pokorny wrote: On 12.05.2019 18:56, Jonas Maebe wrote: As far as range checking and undefined behaviour is concerned, they do. I.e., you won't get undefined behaviour by assigning any value between low(enum)..high(enum) to them. Very good, thank you. IMO this

Re: [fpc-devel] [Patch/RFC] Warnings for (in/over)complete case statements

2019-05-12 Thread Ondrej Pokorny
On 12.05.2019 18:56, Jonas Maebe wrote: As far as range checking and undefined behaviour is concerned, they do. I.e., you won't get undefined behaviour by assigning any value between low(enum)..high(enum) to them. Very good, thank you. IMO this should be clearly documented to avoid

Re: [fpc-devel] [Patch/RFC] Warnings for (in/over)complete case statements

2019-05-12 Thread Jonas Maebe
On 12/05/2019 18:30, Ondrej Pokorny wrote: On 12.05.2019 17:45, Jonas Maebe wrote: It's because Pred and Succ do not make sense with enumerations with holes in our opinion, and could be confusing. E.g. in your example, one could expect at first sight that succ(one) = two. It depends if the

Re: [fpc-devel] [Patch/RFC] Warnings for (in/over)complete case statements

2019-05-12 Thread Ondrej Pokorny
On 12.05.2019 17:45, Jonas Maebe wrote: On 12/05/2019 17:14, Ondrej Pokorny wrote: On 12.05.2019 16:36, Jonas Maebe wrote: Thanks. I have added these warnings to the compiler in r42047, and also the static/dynamic errors for Standard resp. Extended ISO Pascal. Very nice. One question about

Re: [fpc-devel] [Patch/RFC] Warnings for (in/over)complete case statements

2019-05-12 Thread Jonas Maebe
On 12/05/2019 17:14, Ondrej Pokorny wrote: On 12.05.2019 16:36, Jonas Maebe wrote: Thanks. I have added these warnings to the compiler in r42047, and also the static/dynamic errors for Standard resp. Extended ISO Pascal. Very nice. One question about "C-style enumeration types"

Re: [fpc-devel] [Patch/RFC] Warnings for (in/over)complete case statements

2019-05-12 Thread Ondrej Pokorny
On 12.05.2019 16:36, Jonas Maebe wrote: Thanks. I have added these warnings to the compiler in r42047, and also the static/dynamic errors for Standard resp. Extended ISO Pascal. Very nice. One question about "C-style enumeration types"

Re: [fpc-devel] [Patch/RFC] Warnings for (in/over)complete case statements

2019-05-12 Thread Jonas Maebe
On 01/01/2019 22:10, Martok wrote: The attached patch adds two messages inspired by C compiler's -Wswitch-enum and -Wcovered-switch-default. Building on the recent label count refactoring, this was fairly straightforward. - If a case statement on an ordinal does not contain labels for all

[fpc-devel] modeswitch multihelpers

2019-05-12 Thread Ondrej Pokorny
I'd like to thank Ryan & Sven for extending the helpers to be able to handle multiple helpers. Now I can remove my (obtrusive) helper inheritance     THelper2 = class helper(THelper1) for TMyObject very good! This feature deserves a bold announcement. Now we are only missing Lazarus IDE

[fpc-devel] Issue #33603: new feature to check valid enum values

2019-05-12 Thread Ondrej Pokorny
[Continued from the "Dangerous optimization in CASE..OF" thread] On 13.04.2018 12:52, Ondrej Pokorny wrote: I introduced the AS operator for enumerators in https://bugs.freepascal.org/view.php?id=33603 It's already been a year since I posted this patch and still haven't received any