Assorted C Questions
Alan J Rosenthal
flaps at dgp.toronto.edu
Mon Sep 4 13:25:30 AEST 1989
gdtltr at vax1.acs.udel.EDU (Gary D Duzan) writes:
>how necessary are #if directives? It seems to me that it adds too much
>complexity to the preprocessor.
Indeed it does add a lot of complexity to the preprocessor. I think that's why
most people no longer separate the preprocessor and the parser so much these
days.
I don't think expression handling in the preprocessor is SO important. I
currently use a C implementation lacking it, and I don't really miss it much.
What I do miss is that I also can't say "#if THING" where THING is previously
#defined to be zero or non-zero. Do put that in.
Of course, your implementation is not really C without expression handling in
the preprocessor. You'll probably want to add it some day.
>Also, what exactly is a #pragma? An example would help.
Examples: #pragma listing
#pragma used-heavily(i, j, r)
If you just ignore all #pragma lines you'll be fine. If you just abort at any
#pragma line, well, people differ on whether or not that's ok.
ajr
More information about the Comp.lang.c
mailing list