diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | translate.cxx | 7 |
2 files changed, 9 insertions, 3 deletions
@@ -1,3 +1,8 @@ +2006-05-01 Frank Ch. Eigler <fche@elastic.org> + + * translate.cxx (visit_print_format): Fix regression in + "printf" pseudo-result initialization. + 2006-04-30 Frank Ch. Eigler <fche@elastic.org> PR 2610. diff --git a/translate.cxx b/translate.cxx index ef97a99e..b4c54a8d 100644 --- a/translate.cxx +++ b/translate.cxx @@ -3535,12 +3535,13 @@ c_unparser::visit_print_format (print_format* e) tmpvar res = gensym (ty); // Make the [s]printf call, but not if there was an error evaluating the args - o->newline() << res.qname() << " = 0;"; - o->newline() << "if (likely (! c->last_error))"; o->indent(1); if (e->print_to_stream) - o->newline() << "_stp_printf ("; + { + o->newline() << res.qname() << " = 0;"; + o->newline() << "_stp_printf ("; + } else o->newline() << "_stp_snprintf (" << res.qname() << ", MAXSTRINGLEN, "; |