From 877088b7659964d58bf9474519d8b637623e75a0 Mon Sep 17 00:00:00 2001 From: Ilya Tocar Date: Wed, 19 Nov 2014 11:48:48 +0000 Subject: collect2.c (main): Don't call fatal_error before diagnostic_initialize. gcc/ 2014-11-19 Ilya Tocar * collect2.c (main): Don't call fatal_error before diagnostic_initialize. * lto-wrapper.c (main): Likewise. From-SVN: r217765 --- gcc/collect2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gcc/collect2.c') diff --git a/gcc/collect2.c b/gcc/collect2.c index 7c067ff..9c3a1c5 100644 --- a/gcc/collect2.c +++ b/gcc/collect2.c @@ -955,9 +955,6 @@ main (int argc, char **argv) signal (SIGCHLD, SIG_DFL); #endif - if (atexit (collect_atexit) != 0) - fatal_error ("atexit failed"); - /* Unlock the stdio streams. */ unlock_std_streams (); @@ -965,6 +962,9 @@ main (int argc, char **argv) diagnostic_initialize (global_dc, 0); + if (atexit (collect_atexit) != 0) + fatal_error ("atexit failed"); + /* Do not invoke xcalloc before this point, since locale needs to be set first, in case a diagnostic is issued. */ -- cgit v1.1