https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84195
--- Comment #4 from Nick Clifton <nickc at gcc dot gnu.org> --- Author: nickc Date: Fri Jun 15 15:25:16 2018 New Revision: 261633 URL: https://gcc.gnu.org/viewcvs?rev=261633&root=gcc&view=rev Log: Force user provided warning and error messages to only occupy one line. PR 84195 gcc: * 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. * doc/extend.texi (deprecated): Add a note that the deprecation message is affected by the -fmessage-length option, and that control characters will be escaped. (#pragma GCC error): Document this pragma. (#pragma GCC warning): Likewise. * doc/invoke.texi (-fmessage-length): Document this option's effect on the #warning and #error preprocessor directives and the deprecated attribute. testsuite; * gcc.c-torture/compile/pr84195.c: New test. Added: trunk/gcc/testsuite/gcc.c-torture/compile/pr84195.c Modified: trunk/gcc/ChangeLog trunk/gcc/doc/extend.texi trunk/gcc/doc/invoke.texi trunk/gcc/testsuite/ChangeLog