You _CAN_ "stringize" tokens in (some) K&R pre-processors

Doug Gwyn gwyn at smoke.brl.mil
Wed Apr 3 08:11:04 AEST 1991


In article <18148 at crdgw1.crd.ge.com> volpe at camelback.crd.ge.com (Christopher R Volpe) writes:
>I thought just about all K&R1 based compilers expanded formal arguments
>within quotes, so the following would work:
>#define STRINGIZE(x) "x"

No, in fact K&R1 says that the argument must not be replaced within
string literals in the replacement string.

The behavior you cite is a long-standing bug in the Reiser CPP that
was shipped with UNIX for many years.



More information about the Comp.lang.c mailing list