From: Ilya Tocar <tocarip.intel@gmail.com>
To: gcc-patches@gcc.gnu.org
Cc: Bernd Schmidt <bernds@codesourcery.com>
Subject: Re: [PATCH] Don't call fatal_error before error reporting has been initialized.
Date: Thu, 09 Oct 2014 11:48:00 -0000 [thread overview]
Message-ID: <20141009114000.GA81768@msticlxl7.ims.intel.com> (raw)
In-Reply-To: <20140929140245.GA63569@msticlxl7.ims.intel.com>
Ping.
On 29 Sep 18:02, Ilya Tocar wrote:
> Hi,
>
> Currently if call to atexit (lto_wrapper_cleanup) fails we
> won't report error as we haven't initialized error-reporting
> infrastructure. This patch moves this call after diagnostic_initialize.
> I hope that we can't exit inside diagnostic_initialize. Otherwise we
> won't cleanup after it.
> Ok for trunk?
>
> 2014-09-29 Ilya Tocar <ilya.tocar@intel.com>
>
> * lto-wrapper.c (main): Don't call fatal_error before
> diagnostic_initialize.
> ---
> gcc/lto-wrapper.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c
> index 08fd090..39e13b8 100644
> --- a/gcc/lto-wrapper.c
> +++ b/gcc/lto-wrapper.c
> @@ -870,13 +870,13 @@ main (int argc, char *argv[])
>
> xmalloc_set_program_name (progname);
>
> - if (atexit (lto_wrapper_cleanup) != 0)
> - fatal_error ("atexit failed");
> -
> gcc_init_libintl ();
>
> diagnostic_initialize (global_dc, 0);
>
> + if (atexit (lto_wrapper_cleanup) != 0)
> + fatal_error ("atexit failed");
> +
> if (signal (SIGINT, SIG_IGN) != SIG_IGN)
> signal (SIGINT, fatal_signal);
> #ifdef SIGHUP
> --
> 1.8.3.1
>
next prev parent reply other threads:[~2014-10-09 11:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-29 14:03 Ilya Tocar
2014-10-09 11:48 ` Ilya Tocar [this message]
2014-10-20 15:27 ` Ilya Tocar
2014-11-05 16:03 ` [PING][PATCH] " Ilya Tocar
2014-11-17 23:04 ` Jeff Law
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141009114000.GA81768@msticlxl7.ims.intel.com \
--to=tocarip.intel@gmail.com \
--cc=bernds@codesourcery.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).