Hi.

I've got a patch that restores --help=optimize to what we had for GCC 9.
That means it will not print parameters (and the warn_inline warning).

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

Ready to be installed?
Thanks,
Martin
>From 44870c6ac7e97a36cbd0ca102bbe73ab9e808835 Mon Sep 17 00:00:00 2001
From: Martin Liska <mli...@suse.cz>
Date: Fri, 10 Jan 2020 16:45:54 +0100
Subject: [PATCH] Exclude CL_WARNING and CL_PARAM from --help=optimize.

---
 gcc/opts.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gcc/opts.c b/gcc/opts.c
index fa4804c8d15..33a662b54f5 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -2137,6 +2137,11 @@ print_help (struct gcc_options *opts, unsigned int lang_mask,
       a = comma + 1;
     }
 
+  /* 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;
+
   if (include_flags)
     print_specific_help (include_flags, exclude_flags, 0, opts,
 			 lang_mask);
-- 
2.24.1

Reply via email to