On Fri, May 03, 2019 at 12:59:02PM +0200, Martin Liška wrote:
> 2019-05-03  Martin Liska  <mli...@suse.cz>
> 
>       PR other/90315
>       * opts-global.c (decode_options): Print help for all
>       help_option_arguments.
>       * opts.c (print_help): Add new argument.
>       (common_handle_option): Remember all values into
>       help_option_arguments.
>       * opts.h (print_help): Add new argument.

> diff --git a/gcc/opts-global.c b/gcc/opts-global.c
> index e6eaeb20bf7..ce0b1f61603 100644
> --- a/gcc/opts-global.c
> +++ b/gcc/opts-global.c
> @@ -317,8 +317,8 @@ decode_options (struct gcc_options *opts, struct 
> gcc_options *opts_set,
>    finish_options (opts, opts_set, loc);
>  
>    /* Print --help=* if used.  */
> -  if (help_option_argument != NULL)
> -    print_help (opts, lang_mask);
> +  for (unsigned i = 0; i < help_option_arguments.length (); i++)
> +    print_help (opts, lang_mask, help_option_arguments[i]);

Use FOR_EACH_VEC_ELT macro?

Ok with that change.

        Jakub

Reply via email to