diff mbox series

Do not print params in --help except --help=param.

Message ID 06fb4d1f-bb64-2d92-bbf2-7d76d22ccf74@suse.cz
State New
Headers show
Series Do not print params in --help except --help=param. | expand

Commit Message

Martin Liška Jan. 23, 2020, 2:26 p.m. UTC
Hi.

The patch finishes stripping of params in --help dump
for e.g. --help=joined or --help=separate.

Patch can bootstrap on x86_64-linux-gnu and survives regression tests.

Ready to be installed?
Thanks,
Martin

gcc/ChangeLog:

2020-01-23  Martin Liska  <mliska@suse.cz>

	* opts.c (print_help): Exclude params from
	all except --help=param.
---
  gcc/opts.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Jeff Law Jan. 23, 2020, 8 p.m. UTC | #1
On Thu, 2020-01-23 at 15:26 +0100, Martin Liška wrote:
> Hi.
> 
> The patch finishes stripping of params in --help dump
> for e.g. --help=joined or --help=separate.
> 
> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
> 
> Ready to be installed?
> Thanks,
> Martin
> 
> gcc/ChangeLog:
> 
> 2020-01-23  Martin Liska  <mliska@suse.cz>
> 
> 	* opts.c (print_help): Exclude params from
> 	all except --help=param.
OK
jeff
>
diff mbox series

Patch

diff --git a/gcc/opts.c b/gcc/opts.c
index 33a662b54f5..3b2cc854af1 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -2140,7 +2140,9 @@  print_help (struct gcc_options *opts, unsigned int lang_mask,
   /* We started using PerFunction/Optimization for parameters and
      a warning.  We should exclude these from optimization options.  */
   if (include_flags & CL_OPTIMIZATION)
-    exclude_flags |= CL_WARNING | CL_PARAMS;
+    exclude_flags |= CL_WARNING;
+  if (!(include_flags & CL_PARAMS))
+    exclude_flags |= CL_PARAMS;
 
   if (include_flags)
     print_specific_help (include_flags, exclude_flags, 0, opts,