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
This commit is contained in:
parent
9552aca786
commit
184eb658fe
|
@ -1,3 +1,11 @@
|
|||
2010-08-30 Joseph Myers <joseph@codesourcery.com>
|
||||
|
||||
* 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.
|
||||
|
||||
2010-08-30 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
* config/i386/i386.md (zero_extendsidi2_1): Rename from
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -482,7 +482,8 @@ unknown_option_callback (const struct cl_decoded_option *decoded)
|
|||
{
|
||||
const char *opt = decoded->arg;
|
||||
|
||||
if (opt[1] == 'W' && opt[2] == 'n' && opt[3] == 'o' && opt[4] == '-')
|
||||
if (opt[1] == 'W' && opt[2] == 'n' && opt[3] == 'o' && opt[4] == '-'
|
||||
&& !(decoded->errors & CL_ERR_NEGATIVE))
|
||||
{
|
||||
/* We don't generate warnings for unknown -Wno-* options unless
|
||||
we issue diagnostics. */
|
||||
|
|
|
@ -102,6 +102,9 @@ extern const unsigned int cl_lang_count;
|
|||
#define CL_ERR_MISSING_ARG (1 << 1) /* Argument required but missing. */
|
||||
#define CL_ERR_WRONG_LANG (1 << 2) /* Option for wrong language. */
|
||||
#define CL_ERR_UINT_ARG (1 << 3) /* Bad unsigned integer argument. */
|
||||
#define CL_ERR_NEGATIVE (1 << 4) /* Negative form of option
|
||||
not permitted (together
|
||||
with OPT_SPECIAL_unknown). */
|
||||
|
||||
/* Structure describing the result of decoding an option. */
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2010-08-30 Joseph Myers <joseph@codesourcery.com>
|
||||
|
||||
* gcc.dg/opts-1.c: Expect errors, not warnings.
|
||||
|
||||
2010-08-29 Janus Weil <janus@gcc.gnu.org>
|
||||
|
||||
PR fortran/42769
|
||||
|
|
|
@ -5,5 +5,5 @@
|
|||
/* { dg-error "-fno-abi-version" "-fno-abi-version" { target *-*-* } 0 } */
|
||||
/* { dg-error "-fno-lto-compression-level" "-fno-lto-compression-level" { target *-*-* } 0 } */
|
||||
/* { dg-error "-fno-tree-parallelize-loops" "-fno-tree-parallelize-loops" { target *-*-* } 0 } */
|
||||
/* { dg-warning "-Wno-strict-overflow" "-Wno-strict-overflow" { target *-*-* } 0 } */
|
||||
/* { dg-warning "-Wno-strict-aliasing" "-Wno-strict-aliasing" { target *-*-* } 0 } */
|
||||
/* { dg-error "-Wno-strict-overflow" "-Wno-strict-overflow" { target *-*-* } 0 } */
|
||||
/* { dg-error "-Wno-strict-aliasing" "-Wno-strict-aliasing" { target *-*-* } 0 } */
|
||||
|
|
Loading…
Reference in New Issue