quotes inside #if 0

Henry Spencer henry at utzoo.uucp
Thu Sep 7 02:36:08 AEST 1989


In article <2023 at munnari.oz.au> ok at cs.mu.oz.au (Richard O'Keefe) writes:
>... There was never any suggestion in any book
>that #if 0-ed code had to have balanced single quotes, ...

There was never any suggestion that it didn't, either.  One should avoid
the mistake of assuming that books contain all the answers, and that the
apparent lack of a definite answer can always be resolved by a sufficiently
narrow and legalistic reading.  The fact is, this little detail simply
was never specified properly.

>the only C
>compiler I've ever come across (I've used about a dozen) that complains
>about it is the only one I've used that tries to be ANSI-compliant.

This is coincidence.  Let me guess -- most of those dozen were Unix
compilers, right?  Then you haven't used a dozen compilers, you've used
one or two, because most of the Unix ones are the same compiler under
the hood.  Compilers that would not accept your construct existed long
before X3J11 got started.
-- 
V7 /bin/mail source: 554 lines.|     Henry Spencer at U of Toronto Zoology
1989 X.400 specs: 2200+ pages. | uunet!attcan!utzoo!henry henry at zoo.toronto.edu



More information about the Comp.lang.c mailing list