This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 3/3] Introduce IntegerRange for options (PR driver/79659).
- From: Jeff Law <law at redhat dot com>
- To: Martin Liška <mliska at suse dot cz>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Jan Hubicka <hubicka at ucw dot cz>
- Date: Tue, 27 Jun 2017 22:52:11 -0600
- Subject: Re: [PATCH 3/3] Introduce IntegerRange for options (PR driver/79659).
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=law at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 4466380F9C
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 4466380F9C
- References: <174c723b-d90d-9fc9-9935-7a0af7eb63b3@suse.cz> <e773a786-d71a-29f7-6b29-61bd0ba88e14@suse.cz> <4c2a43af-79e3-a3c6-69d6-8ebc00a3a150@suse.cz>
On 03/15/2017 03:58 AM, Martin Liška wrote:
> Huh, I forgot to attach the patch.
>
> Martin
>
> 0001-Introduce-IntegerRange-for-options-PR-driver-79659.patch
>
>
> From bb89456e6cecfa9497cf8e265d2083e762d5bc3e Mon Sep 17 00:00:00 2001
> From: marxin <mliska@suse.cz>
> Date: Mon, 27 Feb 2017 14:07:03 +0100
> Subject: [PATCH] Introduce IntegerRange for options (PR driver/79659).
>
> gcc/ChangeLog:
>
> 2017-02-28 Martin Liska <mliska@suse.cz>
>
> PR driver/79659
> * common.opt: Add IntegerRange to various options.
> * opt-functions.awk (integer_range_info): New function.
> * optc-gen.awk: Add integer_range_info to cl_options struct.
> * opts-common.c (decode_cmdline_option): Handle
> CL_ERR_INT_RANGE_ARG.
> (cmdline_handle_error): Likewise.
> * opts.c (print_filtered_help): Show valid interval in
> when --help is provided.
> * opts.h (struct cl_option): Add range_min and range_max fields.
> * config/i386/i386.opt: Add IntegerRange for -mbranch-cost.
>
> gcc/c-family/ChangeLog:
>
> 2017-02-28 Martin Liska <mliska@suse.cz>
>
> PR driver/79659
> * c.opt: Add IntegerRange to various options.
>
> gcc/testsuite/ChangeLog:
>
> 2017-02-28 Martin Liska <mliska@suse.cz>
>
> PR driver/79659
> * g++.dg/opt/pr79659.C: New test.
Presumably this never fully moved forward because it wasn't a regression?
This looks quite reasonable to me. I'm not sure of the state of the
prereqs and you may want/need to add IntegerRange checks on newly added
options since this was first submitted.
If the prereqs are ack'd, then as far as I'm concerned this is good to
go and you're free to add any new IntegerRange checks you deem
necessary/desirable.
jeff