------- Comment #2 from ghazi at gcc dot gnu dot org 2005-11-28 03:23 ------- Getting stdout wrapped in an inline function is not hard. I can create something fixincl or whatever to capture that. The part I don't know how to do is expand that inline function's body into the code stream from fold_builtin_printf or expand_builtin_printf.
Just inserting the inline function call as the right parameter to fputs and calling expand() used to just magically work when we had the RTL inliner because that ran after builtin expansion. Now with the tree inliner it's too late so we'd have to do something else extra. Anybody have ideas on this? It might also help with PR 24729. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21988