Ensure that control characters in user supplied error and warning messages are escaped.
authorNick Clifton <nickc@redhat.com>
Mon, 18 Jun 2018 10:39:01 +0000 (10:39 +0000)
committerNick Clifton <nickc@gcc.gnu.org>
Mon, 18 Jun 2018 10:39:01 +0000 (10:39 +0000)
commiteede1a6bf3a4f33fa5afef9e4dfc80c4dd89eeb3
tree56e8a2dfac5211be83d19bc9c4f8c9b0fe4ed49e
parenta7fc274f87deeeacb1e0b41bcb571b097b4c929f
Ensure that control characters in user supplied error and warning messages are escaped.

PR 84195
* tree.c (escaped_string): New class.  Converts an unescaped
string into its escaped equivalent.
(warn_deprecated_use): Use the new class to convert the
deprecation message, if present.
(test_escaped_strings): New self test.
(test_c_tests): Add test_escaped_strings.

From-SVN: r261697
gcc/ChangeLog
gcc/tree.c