This is the mail archive of the 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: Question about EDGE_ABNORMAL_CALL edges in cfg

Steven Z wrote:
Can anyone help me with EDGE_ABNORMAL_CALL? It defines
one kind of edges between basic blocks. My question is
when and where this kind edge will be built for what
kind of c program. I have several c programs that
generate EDGE_ABNORMAL_CALL edges and I plan to change
this kind of edges into normal function call and
returns. Is this possible at all?

If it was possible to eliminate them, then we would have already done that.

Consider a call to a C++ function that throws an exception in scope of a catch handler. It will "return" to the handler. It will not return to the point where it was called.

GNU C allows nested functions, and it allows nested functions to branch to labels in the parent function. These are called non-local gotos. Consider a call to a nested function that exits by branching to a label in the parent. It will "return" to the label. It will not return to the point where it was called.
Jim Wilson, GNU Tools Support,

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