[lug] OT: CPP question

Tom Tromey tromey at redhat.com
Fri Mar 29 17:19:07 MST 2002


>>>>> "Tkil" == Tkil  <tkil at scrye.com> writes:

Tkil> what are you doing that you want single-quoted output anyway?
Tkil> is cpp the right tool, or should you investigate m4?

Definitely.  In general using cpp for anything other than C/C++
preprocessing is a going to get you into trouble.  That's particularly
true with newer C preprocessors which are token-based.

Not that m4 doesn't have its own problems...


If you are doing some C thing, and don't need a char literal, just a
char expression, you can use STRINGIFY(x)[0].

Tom



More information about the LUG mailing list