void generate_signal(void)
{
int x = 100;
int y = 0;
int z = x / y;
}
If your FPE signal is generated by something else than a kill/raise
call is usually fatal.
It is flagged as undefined behavior by the posix: "Integer division by
zero has undefined result"
So on some systems/processors it will be ok, on other ones it will
just crash the program.
Re: (i++ * i++) ... > undefined behavior.... > references to the same int.... enforce a crash if the two references refer to the same integer, ... triggered if i1 and i2 refer to the same int, but also if they refer to ... (comp.lang.cpp)
Re: I want my segmentation fault! ... no occurrences of free and a lot of routines returning pointers to ...int length_of_list; ... This invokes undefined behavior because ml1 has been freed. ...memory is really available for reuse, I'd be glad to know about it. ... (comp.lang.c.moderated)
Re: How to send dynamic vector? ... It invokes undefined behavior and you ... main should return int.... Since you don't pass rank to this function, ... (comp.lang.c)
Re: Colon (:) syntax in defining fields in a struct ... you're missing the fact that printf() has no way of knowing the ... corresponding argument is going to be of type int.... so the compiler has no way of knowing what's in it. ... is that it's undefined behavior, meaning that the standard places no ... (comp.lang.c)
Re: Urgent C Questions ... For it to be a C question, urgent or not, it would have to be about ...void main ... The line above generates undefined behavior,... (comp.lang.c)