Oooh. Interesting. Given that 99% of C libraries are not compiled with -fexceptions and do not specify anything nothrow-related in their prototypes (of course not, they're C), this suggests that G++ is introducing a very large number of unnecessary abnormal edges for exceptions potentially raised in calls to such functions that cannot possibly ever be thrown. I wonder how much this is impairing optimization?
Posted Jul 4, 2012 18:43 UTC (Wed) by jwakely (subscriber, #60262)
[Link]
Doesn't the stack have to be unwound similarly for thread cancellation?
The C frames don't need to do any cleanup (no destructors) and should just let the exception propagate unhindered, until it reaches a frame with the right C++ personality to handle it.
I might be completely wrong, but I don't see any obvious reasons the generated code should be different.