Re: [fpc-devel] Different handling of try..except depending on OS?

2020-12-10 Thread Marco van de Voort via fpc-devel
Op 2020-12-10 om 21:57 schreef Sven Barth via fpc-devel: Am 10.12.2020 um 20:54 schrieb Bart via fpc-devel: No fpc in your linux vm ? I'm shocked... ;-) Well, no trunk ;-) On Windows I know how to easily switch between using compilers. 3.2.0 is in path and I have some batch files to change tha

Re: [fpc-devel] Different handling of try..except depending on OS?

2020-12-10 Thread Sven Barth via fpc-devel
Am 10.12.2020 um 20:54 schrieb Bart via fpc-devel: No fpc in your linux vm ? I'm shocked... ;-) Well, no trunk ;-) On Windows I know how to easily switch between using compilers. 3.2.0 is in path and I have some batch files to change that for 3.0.4 and trunk respectively (only in the current con

Re: [fpc-devel] Different handling of try..except depending on OS?

2020-12-10 Thread Bart via fpc-devel
> No fpc in your linux vm ? I'm shocked... ;-) Well, no trunk ;-) On Windows I know how to easily switch between using compilers. 3.2.0 is in path and I have some batch files to change that for 3.0.4 and trunk respectively (only in the current console session). I never had the courage to figure ou

Re: [fpc-devel] Different handling of try..except depending on OS?

2020-12-10 Thread Bart via fpc-devel
On Thu, Dec 10, 2020 at 11:53 AM Michael Van Canneyt via fpc-devel wrote: > > Yes, it should. it's definitely a bug. Done: https://bugs.freepascal.org/view.php?id=38201 -- Bart ___ fpc-devel maillist - fpc-devel@lists.freepascal.org https://lists.f

Re: [fpc-devel] Different handling of try..except depending on OS?

2020-12-10 Thread Sven Barth via fpc-devel
Bart via fpc-devel schrieb am Do., 10. Dez. 2020, 11:56: > On Thu, Dec 10, 2020 at 7:34 AM Sven Barth via fpc-devel > wrote: > > > That is correct, because without the SysUtils unit (which declared the > > Exception type) the RTL can't convert the triggered runtime error to an > > exception type

Re: [fpc-devel] Different handling of try..except depending on OS?

2020-12-10 Thread Michael Van Canneyt via fpc-devel
On Thu, 10 Dec 2020, Tomas Hajny via fpc-devel wrote: On 2020-12-10 07:34, Sven Barth via fpc-devel wrote: Am 09.12.2020 um 23:45 schrieb Bart via fpc-devel: Compiled with fpc 3.2.0 on Windows it will output (both 32 and 64 bit): Runtime error 201 at $004015F1 $004015F1 $00407307 Com

Re: [fpc-devel] Different handling of try..except depending on OS?

2020-12-10 Thread Tomas Hajny via fpc-devel
On 2020-12-10 07:34, Sven Barth via fpc-devel wrote: Am 09.12.2020 um 23:45 schrieb Bart via fpc-devel: Compiled with fpc 3.2.0 on Windows it will output (both 32 and 64 bit): Runtime error 201 at $004015F1 $004015F1 $00407307 Compiled with fpc 3.2.0 on linux X86_64 it will output Except

Re: [fpc-devel] Different handling of try..except depending on OS?

2020-12-10 Thread Michael Van Canneyt via fpc-devel
On Thu, 10 Dec 2020, Bart via fpc-devel wrote: On Thu, Dec 10, 2020 at 7:34 AM Sven Barth via fpc-devel wrote: It's possibly related to FPC using SEH on Win32 and Win64 instead of the SetJump/LongJump based exception handling on other platforms. Slight differences are possible and we'd have

Re: [fpc-devel] Different handling of try..except depending on OS?

2020-12-10 Thread Michael Van Canneyt via fpc-devel
On Thu, 10 Dec 2020, Bart via fpc-devel wrote: On Thu, Dec 10, 2020 at 7:34 AM Sven Barth via fpc-devel wrote: That is correct, because without the SysUtils unit (which declared the Exception type) the RTL can't convert the triggered runtime error to an exception type that can be caught ins

Re: [fpc-devel] Different handling of try..except depending on OS?

2020-12-10 Thread Bart via fpc-devel
On Thu, Dec 10, 2020 at 7:34 AM Sven Barth via fpc-devel wrote: > It's possibly related to FPC using SEH on Win32 and Win64 instead of the > SetJump/LongJump based exception handling on other platforms. Slight > differences are possible and we'd have to investigate why the later does > not correc

Re: [fpc-devel] Different handling of try..except depending on OS?

2020-12-10 Thread Bart via fpc-devel
On Thu, Dec 10, 2020 at 7:34 AM Sven Barth via fpc-devel wrote: > That is correct, because without the SysUtils unit (which declared the > Exception type) the RTL can't convert the triggered runtime error to an > exception type that can be caught inside the try ... except ... end block. I would

Re: [fpc-devel] Different handling of try..except depending on OS?

2020-12-09 Thread Sven Barth via fpc-devel
Am 09.12.2020 um 23:45 schrieb Bart via fpc-devel: Compiled with fpc 3.2.0 on Windows it will output (both 32 and 64 bit): Runtime error 201 at $004015F1 $004015F1 $00407307 Compiled with fpc 3.2.0 on linux X86_64 it will output Except block Finally block On Windows you need to include th

[fpc-devel] Different handling of try..except depending on OS?

2020-12-09 Thread Bart via fpc-devel
Hi, Consider this code: program Test; {$apptype console} {$ifdef fpc} {$mode objfpc} {$endif fpc} {$R+} var Arr: array[1..2] of integer; i: Integer; begin i:=5; try try Arr[i] := 1; except writeln('Except block'); end; finally writeln('Finally block'); end