aboutsummaryrefslogtreecommitdiff
path: root/gcc/opts-common.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2010-08-30 11:30:57 +0100
committerJoseph Myers <jsm28@gcc.gnu.org>2010-08-30 11:30:57 +0100
commit184eb658fe5d4897c705d28ad01c3bd51e8fc62f (patch)
tree2d9eb313ce47a3ac9f0c2ace6d148777d7029209 /gcc/opts-common.c
parent9552aca7868b62ed1fa3532a4bdad93f8dc00f54 (diff)
downloadgcc-184eb658fe5d4897c705d28ad01c3bd51e8fc62f.zip
gcc-184eb658fe5d4897c705d28ad01c3bd51e8fc62f.tar.gz
gcc-184eb658fe5d4897c705d28ad01c3bd51e8fc62f.tar.bz2
opts.h (CL_ERR_NEGATIVE): Define.
* opts.h (CL_ERR_NEGATIVE): Define. * opts.c (unknown_option_callback): Don't postpone warnings for options marked with CL_ERR_NEGATIVE. * opts-common.c (decode_cmdline_option): Set CL_ERR_NEGATIVE error for negative versions of CL_REJECT_NEGATIVE options. testsuite: * gcc.dg/opts-1.c: Expect errors, not warnings. From-SVN: r163637
Diffstat (limited to 'gcc/opts-common.c')
-rw-r--r--gcc/opts-common.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/opts-common.c b/gcc/opts-common.c
index cd4ec2b..871e466 100644
--- a/gcc/opts-common.c
+++ b/gcc/opts-common.c
@@ -197,6 +197,7 @@ decode_cmdline_option (const char **argv, unsigned int lang_mask,
if (!value && (option->flags & CL_REJECT_NEGATIVE))
{
opt_index = OPT_SPECIAL_unknown;
+ errors |= CL_ERR_NEGATIVE;
arg = argv[0];
goto done;
}