V
Vittal
Hello All,
I am trying to get a cut down version of preprocessor output. Let me
make myself clear with a sample:
***************************************************************************
/*file x.c */
#include <stdio.h>
int main ()
{
int i = 10;
#ifdef TEST
i = i +10;
#else
i = i -10;
#endif
printf("The value of i = %d \n",i);
}
*************************************************************************
If I take the preprocessor output for the above file, the output file
will contain huge amount of code as the contents of all the header
files are dumped into output code.
What I am looking at is a output of this nature (if TEST is not
defined)
*********************************************************************
#include <stdio.h>
int main ()
{
int i = 10;
i = i -10;
printf("The value of i = %d \n",i);
}
*********************************************************************
Is it possible to get a output of this nature. Is there any way I can
ask the preprocessor not to dump the header file contents, or is there
any other tool available which can serve this purpose?
Any help in this regard is greatly appreciated.
Thanks
-Vittal
I am trying to get a cut down version of preprocessor output. Let me
make myself clear with a sample:
***************************************************************************
/*file x.c */
#include <stdio.h>
int main ()
{
int i = 10;
#ifdef TEST
i = i +10;
#else
i = i -10;
#endif
printf("The value of i = %d \n",i);
}
*************************************************************************
If I take the preprocessor output for the above file, the output file
will contain huge amount of code as the contents of all the header
files are dumped into output code.
What I am looking at is a output of this nature (if TEST is not
defined)
*********************************************************************
#include <stdio.h>
int main ()
{
int i = 10;
i = i -10;
printf("The value of i = %d \n",i);
}
*********************************************************************
Is it possible to get a output of this nature. Is there any way I can
ask the preprocessor not to dump the header file contents, or is there
any other tool available which can serve this purpose?
Any help in this regard is greatly appreciated.
Thanks
-Vittal