(none)
Jit Keong Tan
jit at SLIC.CELLBIO.DUKE.EDU
Fri Dec 21 00:34:47 AEST 1990
Subject: Re: cc/cpp options note (bug ?)
=>
=> I tried to use the cc -P option, but it did not work. I was expecting a .i
=> file to be generated for each .c.
=>
???? It works for me ?????
====================
preprot.c - This is a file that I contrusted a while ago
to test the behavior of #ifdef's
====================
/* preprocesor test */
main()
{
#ifdef TEST
printf("test 1\n");
#else
printf("test 0\n");
#endif
#ifndef TEST
printf("test 1\n");
#else
printf("test 0\n");
#endif
#if TEST
printf("test 1\n");
#else
printf("test 0\n");
#endif
#if defined(TEST)
printf("test 1\n");
#else
printf("test 0\n");
#endif
exit(0);
}
====================
cc -P preprot.c
====================
output : preprot.i
main()
{
printf("test 0\n");
printf("test 1\n");
printf("test 0\n");
printf("test 0\n");
exit(0);
}
--------------------------------------------------------
Jit Keong Tan | internet: jit at slic.cellbio.duke.edu
(919) 684-8098 | bitnet : tan00001 at dukemc.bitnet
--------------------------------------------------------
U.S. Mail:
Duke University Medical Center
Box 3709
Department Of Cell Biology
Nanaline Duke Bldg., Rm 385
Research Drive
Durham, NC 27710
More information about the Comp.sys.sgi
mailing list