Exclude CL_WARNING and CL_PARAM from --help=optimize.
authorMartin Liska <mliska@suse.cz>
Mon, 13 Jan 2020 13:27:09 +0000 (14:27 +0100)
committerMartin Liska <mliska@suse.cz>
Mon, 13 Jan 2020 13:27:09 +0000 (14:27 +0100)
2020-01-13  Martin Liska  <mliska@suse.cz>

* opts.c (print_help): Do not print CL_PARAM
and CL_WARNING for CL_OPTIMIZATION.

gcc/ChangeLog
gcc/opts.c

index b2d12f4ccb90cee81bbd34f8b2174bff95298512..fc25469452c6a9c6be1e30748fdcc1005cb7c5a7 100644 (file)
@@ -1,3 +1,8 @@
+2020-01-13  Martin Liska  <mliska@suse.cz>
+
+       * opts.c (print_help): Do not print CL_PARAM
+       and CL_WARNING for CL_OPTIMIZATION.
+
 2020-01-13  Jonathan Wakely  <jwakely@redhat.com>
 
        PR driver/92757
index fa4804c8d15edbde49df9ef19cb9be44b5cfe041..33a662b54f5b08cfa873f38e9004f36cad9fae89 100644 (file)
@@ -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);