* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163637
138bc75d-0d04-0410-961f-
82ee72b054a4
+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
if (!value && (option->flags & CL_REJECT_NEGATIVE))
{
opt_index = OPT_SPECIAL_unknown;
+ errors |= CL_ERR_NEGATIVE;
arg = argv[0];
goto done;
}
{
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. */
#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. */
+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
/* { 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 } */