Introduce IntegerRange for options (PR driver/79659).
commit6301008994fa6370261a8c190e4cdf0a27021e63
authorMartin Liska <mliska@suse.cz>
Wed, 28 Jun 2017 12:45:59 +0000 (28 14:45 +0200)
committerMartin Liska <marxin@gcc.gnu.org>
Wed, 28 Jun 2017 12:45:59 +0000 (28 12:45 +0000)
tree95e68b86727f13f74cf2fc3286161cf1780cce3f
parentb1cac008e2629fc225a6ed6a6e748e6caec4dc26
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.

From-SVN: r249734
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]