#DEFINEs and how to process them out

Gavin Stark gest_ss at uhura.cc.rochester.edu
Thu Dec 13 16:04:07 AEST 1990


Question:

	How do I get the following effect:  I want a program to scan
through my C source and process the #ifdef statements.  Like the
following

#define TRUE
#ifdef TRUE
int a;
#endif

should give me just:
int a;

The program I have has LOTS of ifdefs and other such constructions.  Is there
a way to parse out just the ones that actually get compiled?  Thanks for
any suggestions.

Gavin Stark
gest_ss at uhura.cc.rochester.edu



More information about the Comp.lang.c mailing list