Creating a va_list dynamically?
Kaveh R. Ghazi
ghazi@caip.rutgers.edu
Mon Oct 9 10:22:00 GMT 2000
Is it possible to dynamically and portably create a va_list?
I'm trying to see if I can easily teach gcc to optimize e.g.
> fprintf("%d %s", 5, "hello") -> fputs("5 hello")
What I'd like to do is, at compile time, take the tree structures
representing 5 and "hello" and dynamically create a va_list out of
them. Then I'd pass the format arg and the va_list to vasprintf() and
emit a call to fputs with the resulting string.
(If I can't use something like vasprintf, I'd have to rewrite a
complete *printf parser. Bleah.)
Any info would be appreciated.
Thanks,
--Kaveh
--
Kaveh R. Ghazi Engagement Manager / Project Services
ghazi@caip.rutgers.edu Qwest Internet Solutions
More information about the Gcc
mailing list