🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #1682

Re: Making the preprocessor substitute a '#'

#1682
From: Doug Gwyn
Date: Wed, 12 Sep 1990 19:15
10 lines
865 bytes
In article <6261@castle.ed.ac.uk> keith@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).
Technical Details
Message-ID: <13825@smoke.BRL.MIL>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!mcgill-vision!snorkelwacker!usc!wuarchive!udel!haven!adm!smoke!gwyn
References: <6261@castle.ed.ac.uk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!mcgill-vision!snorkelwacker!usc!wuarchive!udel!haven!adm!smoke!gwyn
From: gwyn@smoke.BRL.MIL (Doug Gwyn)
Newsgroups: comp.std.c
Subject: Re: Making the preprocessor substitute a '#'
Message-ID: <13825@smoke.BRL.MIL>
Date: 12 Sep 90 19:15:42 GMT
References: <6261@castle.ed.ac.uk>
Organization: U.S. Army Ballistic Research Laboratory, APG, MD.
Lines: 10