This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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: [OB] Add cleanup, source.c


> >From gdbint.texinfo:
> 
>    Your function should explicitly do or discard the cleanups it
> creates.  Failing to do this leads to non-deterministic behavior since
> the caller will arbitrarily do or discard your functions cleanups.
> This need leads to two common cleanup styles.

Humpf! I think I have contributed loads of patches that do not
follow this advice. I'll be careful in the future, but sometimes
it's not easy. For instance, when you have a function that has
multiple possible exit points...

-- 
Joel


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