Re: [fpc-devel] "Case statement does not handle all possible cases" Warning

2019-05-18 Thread J. Gareth Moreton
Ah yes, I see now - I've found the relevant line in ISO7185, section 6.8.3.5: "One of the case-constants shall be equal to the value of thecase-index upon entry to the case-statement; otherwise, it shall be an error." Strict, but I guess that was what Pascal was built upon, and a good way

Re: [fpc-devel] Closures/anonymous functions update

2019-05-18 Thread Blaise Thorn
Saturday, May 18, 2019 8:32 PM +03:00 from Ryan Joseph : > After 2 months now I’ve not been able to get the required sources to help > finish the closures branch. > The author Blaise did manage to contact me once but then went silent so I > don’t know what happened. Only yesterday, I have

[fpc-devel] Closures/anonymous functions update

2019-05-18 Thread Ryan Joseph
After 2 months now I’ve not been able to get the required sources to help finish the closures branch so I guess it’s best to go to plan B and see if it’s feasible to finish at the last public repository I found. The author Blaise did manage to contact me once but then went silent so I don’t

Re: [fpc-devel] Could the following be merged to 3.2.0 please (committed by Sven)

2019-05-18 Thread Marco van de Voort
Op 2019-05-18 om 19:10 schreef Martin: See the list below. I wonder if they could be merged? If Sven sees no problems ( just say the word), and I'll merge them. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org

Re: [fpc-devel] Closures/anonymous functions update

2019-05-18 Thread Ryan Joseph
> On May 18, 2019, at 11:41 AM, Blaise Thorn wrote: > > Saturday, May 18, 2019 8:32 PM +03:00 from Ryan Joseph > : >> After 2 months now I’ve not been able to get the required sources to help >> finish the closures branch. >> The author Blaise did manage to contact me once but then went

Re: [fpc-devel] Could the following be merged to 3.2.0 please (committed by Sven)

2019-05-18 Thread Sven Barth via fpc-devel
Marco van de Voort schrieb am Sa., 18. Mai 2019, 19:56: > > Op 2019-05-18 om 19:10 schreef Martin: > > See the list below. I wonder if they could be merged? > > If Sven sees no problems ( just say the word), and I'll merge them. > No problems from my side :) Regards, Sven >

Re: [fpc-devel] "Case statement does not handle all possible cases" Warning

2019-05-18 Thread Ralf Quint
On 5/18/2019 4:30 AM, J. Gareth Moreton wrote: Hi everyone, So it looks like this new warning has appeared as part of the data flow analysis of -O4.  The thing is, I personally have a problem with this being a warning, because there's nothing inherently wrong with not covering every case

Re: [fpc-devel] "Case statement does not handle all possible cases" Warning

2019-05-18 Thread J. Gareth Moreton
Yes, I'm jumpy, especially as you always like to open your responses with a direct insult of some kind - yes, I checked.  You want to kill me or ban me from the mailing list, go right ahead. I'm sure Free Pascal will survive without me. We will agree to disagree on that one.  I see a warning

Re: [fpc-devel] "Case statement does not handle all possible cases" Warning

2019-05-18 Thread J. Gareth Moreton
Lazy... you've got a bloody cheek.  Well I guess there's no point in me contributing anything more if that's how you honestly view me.  I wasn't aware of the ISO that dictated that a case block shouldn't just fall through until today, and C/C++ and Basic never threw similar errors or warnings,

Re: [fpc-devel] "Case statement does not handle all possible cases" Warning

2019-05-18 Thread Ralf Quint
On 5/18/2019 3:42 PM, J. Gareth Moreton wrote: Lazy... you've got a bloody cheek.  Well I guess there's no point in me contributing anything more if that's how you honestly view me.  I wasn't aware of the ISO that dictated that a case block shouldn't just fall through until today, and C/C++

Re: [fpc-devel] Could the following be merged to 3.2.0 please (committed by Sven)

2019-05-18 Thread Marco van de Voort
Op 2019-05-18 om 19:10 schreef Martin: See the list below. I wonder if they could be merged? r42098 ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

[fpc-devel] Could the following be merged to 3.2.0 please (committed by Sven)

2019-05-18 Thread Martin
See the list below. I wonder if they could be merged? Thanks for considering. Revision: 42087 Date: 16 May 2019 22:56:18 Message: * fix for Mantis #35566 by applying patch by Martin Friebe: correctly dereference the 32-bit length value for Windows Widestrings Revision: 42039 Date: 11

Re: [fpc-devel] "Case statement does not handle all possible cases" Warning

2019-05-18 Thread Ryan Joseph
> On May 18, 2019, at 7:42 PM, Ralf Quint wrote: > > A warning from the compiler is hence an appropriate response, telling the > programmer to check the source and make a decision, even if it is adding an > empty else clause to the offending case statement. Everything else is just > "lazy

Re: [fpc-devel] fpc trunk fails to build (win32/64)

2019-05-18 Thread Marco van de Voort
Op 2019-05-18 om 01:47 schreef Martin: I reported one case already. https://bugs.freepascal.org/view.php?id=35598 Compiling 42090 for win32 with the options -gl -O4 -Or fails with the warning/error: defutil.pas(1606,7) Warning: Function result variable does not seem to initialized Just run

Re: [fpc-devel] fpc trunk fails to build (win32/64)

2019-05-18 Thread J. Gareth Moreton
On 18/05/2019 11:13, Marco van de Voort wrote: n386flw.pas(142,21) Warning: Case statement does not handle all possible cases What's this warning all about? There are far too many situations where you may not want to handle all possible cases and the implicit else block just goes to the

Re: [fpc-devel] fpc trunk fails to build (win32/64)

2019-05-18 Thread Martin Frb
It's a known issue,  please pass ALLOW_WARNINGS=1  to make to avoid it for now. OK, will do. I reported it, because a month ago it was compiling fine (with the same settings) ___ fpc-devel maillist - fpc-devel@lists.freepascal.org

[fpc-devel] "Case statement does not handle all possible cases" Warning

2019-05-18 Thread J. Gareth Moreton
Hi everyone, So it looks like this new warning has appeared as part of the data flow analysis of -O4.  The thing is, I personally have a problem with this being a warning, because there's nothing inherently wrong with not covering every case branch or omitting an else block (especially if one

Re: [fpc-devel] fpc trunk fails to build (win32/64)

2019-05-18 Thread Marco van de Voort
Op 2019-05-18 om 12:31 schreef Martin Frb: It's a known issue,  please pass ALLOW_WARNINGS=1  to make to avoid it for now. OK, will do. I reported it, because a month ago it was compiling fine (with the same settings) A ticket is always a good thing as a reminder that it is not fixed.

Re: [fpc-devel] "Case statement does not handle all possible cases" Warning

2019-05-18 Thread Jonas Maebe
On 18/05/2019 13:30, J. Gareth Moreton wrote: So it looks like this new warning has appeared as part of the data flow analysis of -O4. The case-completeness warning is not related to any optimization level, nor to the data flow analysis mentioned in the other thread. The thing is, I

Re: [fpc-devel] "Case statement does not handle all possible cases" Warning

2019-05-18 Thread Martok
It's not DFA. See my proposal thread from January and Jonas' implementation from this week: > Warnings should indicate the possibility of unstable

Re: [fpc-devel] "Case statement does not handle all possible cases" Warning

2019-05-18 Thread J. Gareth Moreton
Aah okay.  Thanks Martok and Jonas.  Adding internal errors is definitely a good haul then.  I do think a warning is a bit harsh though over a hint or a note, but if that is what you desire for the compiler (since it does reduce errors), then I'll accept it. I just missed the part where it