This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA][PATCH] Isolate erroneous paths optimization


> Simply trapping doesn't tell you anything about caused the trap.
> There are at least two distinct possibilities: NULL pointer
> dereference and integer division by zero.  There should be some way to
> distinguish those two cases.  It's reasonably easy to do so in a
> signal handler.  When should we do if the compiler generate a call to
> __builtin_throw?

You would use the fallback code in the signal handler, throwing the exception 
used when you don't know the precise cause of the erroneous execution.  Or 
else we could pass an argument to __builtin_throw, but we would need some low-
level convention to pass it on to the handler.

-- 
Eric Botcazou


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]