Commit 36b34127 by Martin Sebor Committed by Martin Sebor

c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.


gcc/c-family/ChangeLog:

	* c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
	* c.opt (-Wformat-diag): Remove a spurious period.

gcc/testsuite/ChangeLog:

	* gcc.dg/weak/weak-19.c: New test.

From-SVN: r271965
parent c613138b
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
......
......@@ -361,7 +361,7 @@ handle_pragma_weak (cpp_reader * ARG_UNUSED (dummy))
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)
......
......@@ -564,7 +564,7 @@ Warn about format strings that contain NUL bytes.
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.
......
/* { 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'" } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment