Re: [fpc-pascal] position of External: SIGFPE

2013-03-25 Thread Xiangrong Fang
> We are now several decades later, but for compatibility reasons the FPU on the x86 processors still uses the same logic. It is possible to get the exception at the place > where it happened by inserting fwait instructions after every fpu operation. Those tell the cpu to stop executing until the F

Re: [fpc-pascal] position of External: SIGFPE

2013-03-25 Thread Jonas Maebe
On 25 Mar 2013, at 01:55, Xiangrong Fang wrote: Why the "External: SIGFPE" error not reported on the line it was generated? e.g. In the following code: 1: if SomeCondition then begin 2: Y := exp(Y); 3: end; 4: d := Data[X]; The SIGFPE is generated on line 2, because Y is too big. But whil

[fpc-pascal] position of External: SIGFPE

2013-03-24 Thread Xiangrong Fang
Hi, Why the "External: SIGFPE" error not reported on the line it was generated? e.g. In the following code: 1: if SomeCondition then begin 2: Y := exp(Y); 3: end; 4: d := Data[X]; The SIGFPE is generated on line 2, because Y is too big. But while the program is running in IDE, it told me that