This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug translator/6851] printf %c
- From: "joshua dot i dot stone at intel dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sources dot redhat dot com
- Date: 9 Sep 2008 01:21:29 -0000
- Subject: [Bug translator/6851] printf %c
- References: <20080820220001.6851.jkenisto@us.ibm.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From joshua dot i dot stone at intel dot com 2008-09-09 01:21 -------
(In reply to comment #1)
> + /* The type of the %c argument is 'char*'. */
Oops, should be 'int' -- in full:
diff --git a/translate.cxx b/translate.cxx
index 2fe3331..4f91e80 100644
--- a/translate.cxx
+++ b/translate.cxx
@@ -4193,6 +4193,9 @@ c_unparser::visit_print_format (print_format* e)
/* The type of the %m argument is 'char*'. */
if (components[i].type == print_format::conv_memory)
o->line() << ", (char*)(uintptr_t)" << tmp[arg_ix++].value();
+ /* The type of the %c argument is 'int'. */
+ else if (components[i].type == print_format::conv_char)
+ o->line() << ", (int)" << tmp[arg_ix++].value();
else
o->line() << ", " << tmp[arg_ix++].value();
}
--
http://sourceware.org/bugzilla/show_bug.cgi?id=6851
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.