summaryrefslogtreecommitdiff
path: root/gcc/print-rtl.c
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>1999-11-25 16:58:32 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>1999-11-25 16:58:32 +0000
commite4ba8dedac8c5cbe675bcabd5bf5a2e9dc4345ef (patch)
tree255cdd5d37dc128a7ad564ade1d1db3d7b9f9af2 /gcc/print-rtl.c
parente082bb8e4b692beae4e05992ad902bb731daa738 (diff)
downloadgcc-e4ba8dedac8c5cbe675bcabd5bf5a2e9dc4345ef.tar.gz
* c-common.c (check_format_info): Don't call a variadic function
with a non-literal format string. * c-decl.c (grokdeclarator, start_struct, finish_struct): Likewise. * c-typeck.c (build_component_ref, build_unary_op, lvalue_or_else, pedantic_lvalue_warning, error_init, pedwarn_init, warning_init): Likewise. * cccp.c (check_macro_name, do_xifdef, vwarning_with_line): Likewise. * collect2.c (collect_wait): Likewise. * dbxout.c (dbxout_type): Likewise. * gcc.c (do_spec_1): Likewise. * genemit.c (gen_insn, gen_expand): Likewise. * genrecog.c (write_switch, write_subroutine): Likewise. * mips-tfile.c (catch_signal, botch): Likewise. * print-rtl.c (print_rtx): Likewise. * toplev.c (default_print_error_function, report_error_function, _fatal_insn): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30666 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/print-rtl.c')
-rw-r--r--gcc/print-rtl.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/gcc/print-rtl.c b/gcc/print-rtl.c
index ef8a40204ae..e54b2b49deb 100644
--- a/gcc/print-rtl.c
+++ b/gcc/print-rtl.c
@@ -146,8 +146,12 @@ print_rtx (in_rtx)
if (XSTR (in_rtx, i) == 0)
fputs (dump_for_graph ? " \\\"\\\"" : " \"\"", outfile);
else
- fprintf (outfile, dump_for_graph ? " (\\\"%s\\\")" : " (\"%s\")",
- XSTR (in_rtx, i));
+ {
+ if (dump_for_graph)
+ fprintf (outfile, " (\\\"%s\\\")", XSTR (in_rtx, i));
+ else
+ fprintf (outfile, " (\"%s\")", XSTR (in_rtx, i));
+ }
sawclose = 1;
break;
@@ -188,13 +192,16 @@ print_rtx (in_rtx)
}
else
{
- char *str = X0STR (in_rtx, i);
+ const char * const str = X0STR (in_rtx, i);
if (str == 0)
fputs (dump_for_graph ? " \\\"\\\"" : " \"\"", outfile);
else
- fprintf (outfile,
- dump_for_graph ? " (\\\"%s\\\")" : " (\"%s\")",
- str);
+ {
+ if (dump_for_graph)
+ fprintf (outfile, " (\\\"%s\\\")", str);
+ else
+ fprintf (outfile, " (\"%s\")", str);
+ }
}
}
break;