PR c/77520 - wrong value for extended ASCII characters in -Wformat message
authorMartin Sebor <msebor@redhat.com>
Fri, 9 Sep 2016 23:12:10 +0000 (23:12 +0000)
committerMartin Sebor <msebor@gcc.gnu.org>
Fri, 9 Sep 2016 23:12:10 +0000 (17:12 -0600)
commit3f0177e74c294542a770fc23742c4e306a1e5d04
treef486cc289cc2e46c1ccb063b50662b02da10b20b
parent5368023839d4bfc78f980692670be093cf2fdf2f
PR c/77520 - wrong value for extended ASCII characters in -Wformat message

PR c/77520 - wrong value for extended ASCII characters in -Wformat message
PR c/77521 - %qc format directive should quote non-printable characters

gcc/c-family/ChangeLog:

PR c/77520
PR c/77521
* c-format.c (argument_parser::find_format_char_info): Use %qc
format directive unconditionally.

gcc/ChangeLog:

PR c/77520
PR c/77521
* pretty-print.c (pp_quoted_string): New function.
(pp_format): Call it for %c and %s directives.

gcc/testsuite/ChangeLog:

PR c/77520
PR c/77521
* gcc.dg/pr77520.c: New test.
* gcc.dg/pr77521.c: New test.

From-SVN: r240059
gcc/ChangeLog
gcc/c-family/ChangeLog
gcc/c-family/c-format.c
gcc/pretty-print.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr77520.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr77521.c [new file with mode: 0644]