Introduce IntegerRange for options (PR driver/79659).
commit52368c3466e6cda349d981d82d577d7edba3ff7c
authormarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 28 Jun 2017 12:45:59 +0000 (28 12:45 +0000)
committermarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 28 Jun 2017 12:45:59 +0000 (28 12:45 +0000)
tree95e68b86727f13f74cf2fc3286161cf1780cce3f
parent932b72f08b19edd60d53836edb0901e13d2c2cf2
Introduce IntegerRange for options (PR driver/79659).

2017-06-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.
2017-06-28  Martin Liska  <mliska@suse.cz>

PR driver/79659
* c.opt: Add IntegerRange to various options.
2017-06-28  Martin Liska  <mliska@suse.cz>

PR driver/79659
* g++.dg/opt/pr79659.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@249734 138bc75d-0d04-0410-961f-82ee72b054a4
12 files changed:
gcc/ChangeLog
gcc/c-family/ChangeLog
gcc/c-family/c.opt
gcc/common.opt
gcc/config/i386/i386.opt
gcc/opt-functions.awk
gcc/optc-gen.awk
gcc/opts-common.c
gcc/opts.c
gcc/opts.h
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/opt/pr79659.C [new file with mode: 0644]