This makes sure to not promote diagnostics about unrecognized -Wno-
options to errors and make the intent of the diagnostic clearer.
2020-02-17 Richard Biener <rguenther@suse.de>
PR c/86134
* opts-global.c (print_ignored_options): Use inform and
amend message.
* gcc.dg/pr86134.c: New testcase.
* gcc.dg/pr28322-2.c: Adjust.
+2020-02-17 Richard Biener <rguenther@suse.de>
+
+ PR c/86134
+ * opts-global.c (print_ignored_options): Use inform and
+ amend message.
+
2020-02-17 Jiufu Guo <guojiufu@linux.ibm.com>
PR target/93047
const char *opt;
opt = ignored_options.pop ();
- warning_at (UNKNOWN_LOCATION, 0,
- "unrecognized command-line option %qs", opt);
+ /* Use inform, not warning_at, to avoid promoting these to errors. */
+ inform (UNKNOWN_LOCATION,
+ "unrecognized command-line option %qs may have been intended "
+ "to silence earlier diagnostics", opt);
}
}
+2020-02-17 Richard Biener <rguenther@suse.de>
+
+ PR c/86134
+ * gcc.dg/pr86134.c: New testcase.
+ * gcc.dg/pr28322-2.c: Adjust.
+
2020-02-17 David Malcolm <dmalcolm@redhat.com>
PR analyzer/93388
return i;
}
-/* { dg-warning "unrecognized command-line option .-Wno-foobar." "" { target *-*-* } 0 } */
+/* { dg-message "unrecognized command-line option .-Wno-foobar." "" { target *-*-* } 0 } */
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-Wall -Werror -Wno-error=main -Wno-foobar" } */
+
+void main() {} /* { dg-warning "return type" } */
+
+/* { dg-message "unrecognized command-line option" "" { target *-*-* } 0 } */