|
|
On 10 Jul., 11:06, Bernd Strieder <strie...@xxxxxxxxxxxxxxxxxxxx>
wrote:
> Hello,
>
> thomas.mer...@xxxxxx wrote:
> > I have problems when I try to catch a division by zero for
> > two times. I try to emulate exceptions with setjmp/longjmp.
>
> > To catch a division by zero I use a handler for the signal
> > SIGFPE. In the signal handler I use longjmp to jump to the
> > exception handler.
> > Has someone an idea how a program can have more than
> > one SIGFPE catched with a setjmp/longjmp exception?
>
> See the discussion at:
>
> http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1305.pdf
Thank you, I found this also.
But I need a solution, because I want to emulate
exception handling with it.
Reasons, why it doesn't work, don't help me.
> and the following sections of the glibc info pages.
Are they available online?
Can you give me a link?
> 20.7 Floating-Point Control Functions
> 24.2.1 Program Error Signals
>
> Returning from the SIGFPE handler the first time already invokes
> undefined behaviour. The second time is completely off.
Ok, that's the reason it does not work.
BTW in older versions of the GCC I had no problems with that stuff.
Greetings Thomas Mertes
Seed7 Homepage: http://seed7.sourceforge.net
Seed7 - The extensible programming language: User defined statements
and operators, abstract data types, templates without special
syntax, OO with interfaces and multiple dispatch, statically typed,
interpreted or compiled, portable, runs under linux/unix/windows.
|
|