+2019-06-05 Martin Sebor <msebor@redhat.com>
+
+ * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
+ * c.opt (-Wformat-diag): Remove a spurious period.
+
2019-05-29 Jakub Jelinek <jakub@redhat.com>
PR c/90628
if (t == CPP_EQ)
{
if (pragma_lex (&value) != CPP_NAME)
- GCC_BAD ("%<malformed #pragma weak%>, ignored");
+ GCC_BAD ("malformed %<#pragma weak%>, ignored");
t = pragma_lex (&x);
}
if (t != CPP_EOF)
Wformat-diag
C ObjC C++ ObjC++ Var(warn_format_diag) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 1, 0)
-Warn about GCC format strings with strings unsuitable for diagnostics..
+Warn about GCC format strings with strings unsuitable for diagnostics.
Wformat-extra-args
C ObjC C++ ObjC++ Var(warn_format_extra_args) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 1, 0)
+2019-06-05 Martin Sebor <msebor@redhat.com>
+
+ * gcc.dg/weak/weak-19.c: New test.
+
2019-06-05 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/specs/discr6.ads: New test.
--- /dev/null
+/* { dg-do compile }
+ { dg-require-weak "" } */
+
+/* Verify that the following invalid pragmas are diagnosed. */
+
+#pragma weak foo = 1 /* { dg-warning "malformed '#pragma weak'" } */
+#pragma weak foo = + /* { dg-warning "malformed '#pragma weak'" } */
+#pragma weak foo = ? /* { dg-warning "malformed '#pragma weak'" } */