[cfe-dev] Generating printf format specifiers

Dave Keck davekeck at gmail.com
Fri Jan 22 12:23:20 PST 2010

Thanks for the reply!

> It depends on what you mean by "substitute".  __typeof__ is not a macro;  it doesn't substitute tokens or anything, it actually gets parsed and interpreted by the semantic layer as a special kind of type-sugaring.  It looks like you want __fmt__ to work much more like a macro, since string-literal concatenation is still happening.  That's somewhat trickier and raises some interesting questions about behavior.

Ah yes - please excuse my loose language.

> Also, we try to be very cautious about accepting new language enhancements, even in Objective C.  We'll really need to talk about whether we want this before we can accept it.

I see; I just wanted to inquire to see if I could get any hints of how
I might do it myself, more as an exercise than anything else. Official
support would be great, though!


More information about the cfe-dev mailing list