Making the preprocessor substitute a '#'

Doug Gwyn gwyn at smoke.BRL.MIL
Thu Sep 13 05:15:42 AEST 1990


In article <6261 at castle.ed.ac.uk> keith at earth.ox.ac.uk writes:
>#define FOO  # pragma bar
>The trouble is, of course that an ansi cpp interprets the # as a
>stringizing instruction.

No, stringizing occurs only when processing a replacement list for
a function-like macro, which FOO in this example is not.

However, your real problem is that replaced text is not rescanned
for preprocessing directives (including #pragma).



More information about the Comp.std.c mailing list