From: zack Date: Wed, 20 Feb 2002 05:04:39 +0000 (+0000) Subject: * toplev.c (output_quoted_string): Write unprintable X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=686ddf2e61acd545aa15c9319fc8bcbc62ac98e3;p=thirdparty%2Fgcc.git * toplev.c (output_quoted_string): Write unprintable characters with octal escapes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49891 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 55f0d4f58fff..e5bc35e6e3ff 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2002-02-19 Zack Weinberg + + * toplev.c (output_quoted_string): Write unprintable + characters with octal escapes. + 2002-02-19 David Edelsohn * config/rs6000/rs6000.h (CONDITIONAL_REGISTER_USAGE): Set diff --git a/gcc/toplev.c b/gcc/toplev.c index 4a644d854903..4964d2e2c06e 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -1762,9 +1762,14 @@ output_quoted_string (asm_file, string) putc ('\"', asm_file); while ((c = *string++) != 0) { - if (c == '\"' || c == '\\') - putc ('\\', asm_file); - putc (c, asm_file); + if (ISPRINT (c)) + { + if (c == '\"' || c == '\\') + putc ('\\', asm_file); + putc (c, asm_file); + } + else + fprintf (asm_file, "\\%03o", c); } putc ('\"', asm_file); #endif