Xref: utzoo comp.lang.c:37021 alt.sources:3472 Newsgroups: comp.lang.c,alt.sources Path: utzoo!henry From: henry@zoo.toronto.edu (Henry Spencer) Subject: Re: Small introspective program Message-ID: <1991Mar13.164627.20530@zoo.toronto.edu> Date: Wed, 13 Mar 1991 16:46:27 GMT References: <1991Mar10.231230.1301@casbah.acns.nwu.edu> <1991Mar12.050929.2870@research.canon.oz.au> <1991Mar13.001423.5194@Think.COM> Organization: U of Toronto Zoology In article <1991Mar13.001423.5194@Think.COM> dm@think.com (Dave Mankins) writes: >You start the program (e.g., ``foo.c'') with: > >#ifdef notdef > cc $0 -g -o `basename $0 .c` -Ineeded-includes -lneeded-libraries > exit; >#endif notdef It is no longer legal to put arbitrary trash after "#endif", so that identifier has to go. "#endif /* notdef */" is better. Note also that you need to be careful about what you put inside #ifdef, because it is *not* completely ignored. The above example should be okay, but in general the contents have to be either legal C tokens or things that could not be mistaken for C tokens. Notably, an unmatched ' or " is not kosher. -- "But this *is* the simplified version | Henry Spencer @ U of Toronto Zoology for the general public." -S. Harris | henry@zoo.toronto.edu utzoo!henry