This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Defining cmd line symbolic literals
- From: "Mohamed Shafi" <shafitvm at gmail dot com>
- To: gcc at gcc dot gnu dot org
- Date: Mon, 18 Dec 2006 11:46:59 +0530
- Subject: 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