Commit 90389422 by Per Bothner Committed by Per Bothner

print-tree.c (print_node): In a STRING_CST...


	* print-tree.c (print_node):  In a STRING_CST, escape non-ascii
	characters, and only print TREE_STRING_LENGTH chars.

From-SVN: r56994
parent 278bba8b
2002-09-09 Per Bothner <per@bothner.com>
* print-tree.c (print_node): In a STRING_CST, escape non-ascii
characters, and only print TREE_STRING_LENGTH chars.
2002-09-09 Steve Ellcey <sje@cup.hp.com>
* config/ia64/hpux.h (TARGET_HPUX_LD): New, define true.
......
......@@ -711,7 +711,20 @@ print_node (file, prefix, node, indent)
break;
case STRING_CST:
fprintf (file, " \"%s\"", TREE_STRING_POINTER (node));
{
const char *p = TREE_STRING_POINTER (node);
int i = TREE_STRING_LENGTH (node);
fputs (" \"", file);
while (--i >= 0)
{
char ch = *p++;
if (ch >= ' ' && ch < 127)
putc (ch, file);
else
fprintf(file, "\\%03o", ch & 0xFF);
}
fputc ('\"', file);
}
/* Print the chain at second level. */
if (indent == 4)
print_node (file, "chain", TREE_CHAIN (node), indent + 4);
......
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