This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Defining cmd line symbolic literals


Hello all,

I am building a GCC Compiler. I have some ifdef checks in the compiler
source code. In case i define a symbolic literal in command line while
compiling a sample program, I want that set of statements to be
invoked after ifdef checks.

e.g.
GCC Source:
#ifdef SHAFI_DEBUG
printf("\n Shafi Debugging!!\n");
#endif

compiling 1.c:
gcc -DSHAFI_DEBUG 1.c

Is there any way to do this ?

Thanks in advance

Regards,
Shafi


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]