aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcc.c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2019-05-02 10:16:12 +0200
committerMartin Liska <marxin@gcc.gnu.org>2019-05-02 08:16:12 +0000
commit2dcfc8722b6146e479039a2f8994050c772b25e6 (patch)
tree1fa0518e606198867e6361602184e0b1795ca3db /gcc/gcc.c
parent786e0e5239529de9a4254fe8411a0e8f843e721a (diff)
downloadgcc-2dcfc8722b6146e479039a2f8994050c772b25e6.zip
gcc-2dcfc8722b6146e479039a2f8994050c772b25e6.tar.gz
gcc-2dcfc8722b6146e479039a2f8994050c772b25e6.tar.bz2
Postpone print of --help=* option.
2019-05-02 Martin Liska <mliska@suse.cz> * 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
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r--gcc/gcc.c5
1 files changed, 2 insertions, 3 deletions
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");