From 2dcfc8722b6146e479039a2f8994050c772b25e6 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Thu, 2 May 2019 10:16:12 +0200 Subject: Postpone print of --help=* option. 2019-05-02 Martin Liska * gcc.c (process_command): Add dummy file only if n_infiles == 0. * opts-global.c (decode_options): Pass lang_mask. * opts.c (print_help): New function. (finish_options): Print --help if help_option_argument is set. (common_handle_option): Factor out content of OPT__help_ into print_help. * opts.h (finish_options): Add new argument. From-SVN: r270788 --- gcc/gcc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'gcc/gcc.c') diff --git a/gcc/gcc.c b/gcc/gcc.c index 4f57765..a1003a5 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -4751,10 +4751,9 @@ process_command (unsigned int decoded_options_count, } /* Ensure we only invoke each subprocess once. */ - if (print_subprocess_help || print_help_list || print_version) + if (n_infiles == 0 + && (print_subprocess_help || print_help_list || print_version)) { - n_infiles = 0; - /* Create a dummy input file, so that we can pass the help option on to the various sub-processes. */ add_infile ("help-dummy", "c"); -- cgit v1.1