This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug translator/6851] printf %c


------- 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]