3B2 cpp #ifdef + #include

Henry Spencer henry at utzoo.uucp
Sat Apr 2 09:38:10 AEST 1988


> I've found the relevant statement in 3.8.1: "[when a group is skipped]
> directives are processed only through the name that determines the directive
> in order to keep track of the level of nested conditionals; the rest of the
> directives' preprocessing tokens are ignored...
> the non-VMS system is obliged to stop reading after the word "ifdef" in the
> second line, and NOT complain about the "$"...

Ah, but if the $ is not in the C character set the compiler is willing to
accept (outside comments and strings), then $ is arguably *not* a
preprocessing token at all!  Section 2.2.1 makes the compiler's action
in this case undefined, so the compiler is not wrong to complain.

(Note that I say "arguably"; there is some hairsplitting that could be
invoked here as a result of some fuzzy wording.)
-- 
"Noalias must go.  This is           |  Henry Spencer @ U of Toronto Zoology
non-negotiable."  --DMR              | {allegra,ihnp4,decvax,utai}!utzoo!henry



More information about the Comp.lang.c mailing list