From f5334f06d202d6af44c024b984f3860906bf7009 Mon Sep 17 00:00:00 2001 From: fche Date: Mon, 1 May 2006 17:41:10 +0000 Subject: 2006-05-01 Frank Ch. Eigler * translate.cxx (visit_print_format): Fix regression in "printf" pseudo-result initialization. --- ChangeLog | 5 +++++ translate.cxx | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index aa5f720d..39ff7105 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-05-01 Frank Ch. Eigler + + * translate.cxx (visit_print_format): Fix regression in + "printf" pseudo-result initialization. + 2006-04-30 Frank Ch. Eigler 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, "; -- cgit