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: [PATCH] PR/57652 collect2 temp files


On Wed, 19 Jun 2013, David Edelsohn wrote:

> A 2011 change to collect2 to use the standard diagnostics
> infrastructure broke collect2's cleanup of temp files when an error
> occurs.  This prototype of a patch implements the minimal conversion
> of collect2 to use atexit().
> 
> If this is the right direction, all calls to collect_exit() can be
> converted to exit().
> 
> Thanks, David
> 
>         PR driver/57652
>         * collect2.c (collect_atexit): New.
>         (collect_exit): Directly call exit.
>         (main): Register collect_atexit with atexit.

This is OK.  Using atexit seems to me to be the right approach for such 
cleanup.

-- 
Joseph S. Myers
joseph@codesourcery.com


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