Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!ucsd!ucbvax!SLIC.CELLBIO.DUKE.EDU!jit From: jit@SLIC.CELLBIO.DUKE.EDU (Jit Keong Tan) Newsgroups: comp.sys.sgi Subject: (none) Message-ID: <9012201334.AA11787@slic.cellbio.duke.edu> Date: 20 Dec 90 13:34:47 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 85 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@slic.cellbio.duke.edu (919) 684-8098 | bitnet : tan00001@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