Deleting File in as_fatal

View: New views
5 Messages — Rating Filter:   Alert me  

Deleting File in as_fatal

by Evandro Menezes :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Shouldn't the output file be deleted in as_fatal () in messages.c regardless of the value of USE_STDARG?

TIA

Re: Deleting File in as_fatal

by Alan Modra :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Oct 27, 2009 at 01:33:53PM -0700, Evandro Menezes wrote:
> Shouldn't the output file be deleted in as_fatal ()

Why?  We have an xatexit function to delete the file.

--
Alan Modra
Australia Development Lab, IBM

Re: Deleting File in as_fatal

by Alan Modra :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Oct 28, 2009 at 09:32:50AM +1030, Alan Modra wrote:
> On Tue, Oct 27, 2009 at 01:33:53PM -0700, Evandro Menezes wrote:
> > Shouldn't the output file be deleted in as_fatal ()
>
> Why?  We have an xatexit function to delete the file.

Doh!  Ignore that comment.  I wrote it without checking the code..

--
Alan Modra
Australia Development Lab, IBM

Parent Message unknown Re: Deleting File in as_fatal

by Evandro Menezes :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

 > On Wed, Oct 28, 2009 at 09:32:50AM +1030, Alan Modra wrote:
> >

> > On Tue, Oct 27, 2009 at 01:33:53PM -0700, Evandro Menezes wrote:
> >
> > > Shouldn't the output file be deleted in as_fatal ()
> >
> > Why?  We have an xatexit function to delete the file.
>
> Doh!  Ignore that comment.  I wrote it without checking the code..

So, shouldn't it include the couple of lines from the version of as_fatal () when USE_STDARG is defined?

TIA

Parent Message unknown Re: Deleting File in as_fatal

by Alan Modra :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Oct 29, 2009 at 08:01:02AM -0700, Evandro Menezes wrote:
> So, shouldn't it include the couple of lines from the version of as_fatal () when USE_STDARG is defined?

Indeed.  Applied.

        * messages.c (as_fatal): Apply 2001-01-15 change and followup
        to second copy of function.

Index: gas/messages.c
===================================================================
RCS file: /cvs/src/src/gas/messages.c,v
retrieving revision 1.21
diff -u -p -r1.21 messages.c
--- gas/messages.c 30 Jul 2008 04:34:57 -0000 1.21
+++ gas/messages.c 2 Nov 2009 01:59:15 -0000
@@ -383,6 +383,8 @@ as_fatal (format, va_alist)
   vfprintf (stderr, format, args);
   (void) putc ('\n', stderr);
   va_end (args);
+  if (out_file_name != NULL)
+    unlink_if_ordinary (out_file_name);
   xexit (EXIT_FAILURE);
 }
 #endif /* not NO_STDARG */

--
Alan Modra
Australia Development Lab, IBM