From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1666) id 6C3D3385843D; Thu, 21 Oct 2021 11:04:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6C3D3385843D MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Richard Biener To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-4605] Move the initial debug_hooks setting X-Act-Checkin: gcc X-Git-Author: Richard Biener X-Git-Refname: refs/heads/master X-Git-Oldrev: 8516963942b0a8f06fa8f5ebd7c37f9edea151ac X-Git-Newrev: d97fa0d44c22f6bd96140e4ee613b65fbd8f559a Message-Id: <20211021110406.6C3D3385843D@sourceware.org> Date: Thu, 21 Oct 2021 11:04:06 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Oct 2021 11:04:06 -0000 https://gcc.gnu.org/g:d97fa0d44c22f6bd96140e4ee613b65fbd8f559a commit r12-4605-gd97fa0d44c22f6bd96140e4ee613b65fbd8f559a Author: Richard Biener Date: Thu Oct 21 12:12:00 2021 +0200 Move the initial debug_hooks setting I just realized that when I moved the langhook call I failed to move the initial debug_hooks setting whose comment mentions the langhook as reason. 2021-10-21 Richard Biener * toplev.c (process_options): Move the initial debug_hooks setting ... (toplev::main): ... before the call of the post_options langhook. Diff: --- gcc/toplev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/toplev.c b/gcc/toplev.c index cb4f8c470f0..67fb71612d5 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -1227,9 +1227,6 @@ static void process_options (bool no_backend) { const char *language_string = lang_hooks.name; - /* Just in case lang_hooks.post_options ends up calling a debug_hook. - This can happen with incorrect pre-processed input. */ - debug_hooks = &do_nothing_debug_hooks; maximum_field_alignment = initial_max_fld_align * BITS_PER_UNIT; @@ -2338,6 +2335,9 @@ toplev::main (int argc, char **argv) /* Exit early if we can (e.g. -help). */ if (!exit_after_options) { + /* Just in case lang_hooks.post_options ends up calling a debug_hook. + This can happen with incorrect pre-processed input. */ + debug_hooks = &do_nothing_debug_hooks; /* Allow the front end to perform consistency checks and do further initialization based on the command line options. This hook also sets the original filename if appropriate (e.g. foo.i -> foo.c)