aboutsummaryrefslogtreecommitdiff
path: root/gcc/opts-common.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2011-03-30 20:42:51 +0100
committerJoseph Myers <jsm28@gcc.gnu.org>2011-03-30 20:42:51 +0100
commit666a21a2993b36e8c10f2d0759cd7f68811663fb (patch)
tree8d690cb4ef7d285476b7a0854fa4a67ca23779ba /gcc/opts-common.c
parent0fa4e351537fe6bf253e13e3c3e7b122cbe9468c (diff)
downloadgcc-666a21a2993b36e8c10f2d0759cd7f68811663fb.zip
gcc-666a21a2993b36e8c10f2d0759cd7f68811663fb.tar.gz
gcc-666a21a2993b36e8c10f2d0759cd7f68811663fb.tar.bz2
options.texi (NegativeAlias): Document.
* doc/options.texi (NegativeAlias): Document. (Alias): Mention NegativeAlias. * opt-functions.awk: Handle NegativeAlias. * optc-gen.awk: Disallow NegativeAlias with multiple Alias arguments. * opts-common.c (decode_cmdline_option): Handle CL_NEGATIVE_ALIAS. * opts.h (CL_NEGATIVE_ALIAS): Define. * config/rs6000/rs6000.c (rs6000_parse_yes_no_option): Remove. (rs6000_handle_option): Don't handle OPT_mvrsave_, OPT_misel_ and OPT_mspe_. * config/rs6000/rs6000.opt (mvrsave=, misel=, mspe=): Replace with Alias entries. * config/rs6000/t-spe (MULTILIB_OPTIONS, MULTILIB_EXCEPTIONS): Use mno-spe and mno-isel instead of mspe=no and -misel=no. From-SVN: r171745
Diffstat (limited to 'gcc/opts-common.c')
-rw-r--r--gcc/opts-common.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/opts-common.c b/gcc/opts-common.c
index 345afe8..a88aed0 100644
--- a/gcc/opts-common.c
+++ b/gcc/opts-common.c
@@ -507,6 +507,7 @@ decode_cmdline_option (const char **argv, unsigned int lang_mask,
{
gcc_assert (option->alias_arg != NULL);
gcc_assert (arg == NULL);
+ gcc_assert (!(option->flags & CL_NEGATIVE_ALIAS));
if (value)
arg = option->alias_arg;
else
@@ -517,9 +518,13 @@ decode_cmdline_option (const char **argv, unsigned int lang_mask,
{
gcc_assert (value == 1);
gcc_assert (arg == NULL);
+ gcc_assert (!(option->flags & CL_NEGATIVE_ALIAS));
arg = option->alias_arg;
}
+ if (option->flags & CL_NEGATIVE_ALIAS)
+ value = !value;
+
opt_index = new_opt_index;
option = new_option;