From patchwork Thu Jan 23 14:26:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 1228059 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-518139-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha1 header.s=default header.b=KFlhjmy+; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 483Phs6GTxz9sSL for ; Fri, 24 Jan 2020 01:26:20 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :subject:to:message-id:date:mime-version:content-type; q=dns; s= default; b=Z9y9CcC9hosj1xGpsIpH+VsIr+tyWVe03hQdR8XYYrZ2Ah70JMdDo UZ8o3AW6JXAnrcQNzqCohkk566Mj815cOPv9qUfVakEYGhIyQIY2httIR/5sNEf1 oDLYxxZW1Fw4ljs6PJ31GRygoMVGRRov3N28ktfZsucGNnwrW9bnPw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :subject:to:message-id:date:mime-version:content-type; s= default; bh=ZlMw12LGdISorwcZzCi+Ua1b5Y0=; b=KFlhjmy+V9eFXS5LOcvl zUClNjiTC55PBAX7rpldDdjsGvWO18Ygg9e6dJ7Kx5hGyY2vXmhSiM/9dT8X2kBB UEdhWrnuIx2Uhi4RyKyTDSNlBvCePb9vhAemDW+pIaGeEONcbILxzsJna4U0NeyX m/HqQnhekcpiBkinQJNCvmk= Received: (qmail 60533 invoked by alias); 23 Jan 2020 14:26:12 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 60523 invoked by uid 89); 23 Jan 2020 14:26:12 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 23 Jan 2020 14:26:11 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 6CD10AC42 for ; Thu, 23 Jan 2020 14:26:09 +0000 (UTC) From: =?utf-8?q?Martin_Li=C5=A1ka?= Subject: [PATCH] Do not print params in --help except --help=param. To: gcc-patches@gcc.gnu.org Message-ID: <06fb4d1f-bb64-2d92-bbf2-7d76d22ccf74@suse.cz> Date: Thu, 23 Jan 2020 15:26:09 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 X-IsSubscribed: yes 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 * opts.c (print_help): Exclude params from all except --help=param. --- gcc/opts.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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,