From: Hazen B. <hba...@ma...> - 2016-02-28 03:48:06
|
On 02/27/2016 10:10 PM, Alan W. Irwin wrote: > On 2016-02-27 23:22-0000 Phil Rosenberg wrote: > >> Perhaps it would be good for Hazen and Alan to start looking > in more detail at implementing the error code propagation? If there > are tools to help with that, then maybe it will be easier than I > suspect. > > I am now confident of the return code method because of the > 'warn_unused_result' gcc attribute capability, but let's not even > start the substantial work required for this alternative unless it is > made necessary because you run into some showstopper issue with the C > exception-based alternative. Before you begin I would encourage you to read this: http://stackoverflow.com/questions/14685406/practical-usage-of-setjmp-and-longjmp-in-c Particularly the 2nd and 3rd answers. As they point out, this is *not* C++ exception handling in C, this is just a goto statement. To me that would be a showstopper issue. However, who does the work decides, so if this approach is still your preference then I won't persist in trying to dissuade you. -Hazen |