Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!umd5!uvaarpa!mcnc!decvax!ima!haddock!karl From: karl@haddock.ISC.COM (Karl Heuer) Newsgroups: comp.lang.c Subject: Re: 3B2 cpp #ifdef + #include Message-ID: <3286@haddock.ISC.COM> Date: 1 Apr 88 19:24:25 GMT References: <109@iquery.UUCP> <3127@csli.STANFORD.EDU> <3210@haddock.ISC.COM> <10171@steinmetz.steinmetz.ge.com> <4419@chinet.UUCP> Reply-To: karl@haddock.ima.isc.com (Karl Heuer) Organization: Interactive Systems, Boston Lines: 20 In article <4419@chinet.UUCP> les@chinet.UUCP (Leslie Mikesell) writes: >>| #ifdef vms >>| #ifdef foo$bar /* a valid name, in VMS */ >>| #endif >>| #endif > >In the case of the 3B2 compiler, this will give a "bad include syntax" error >regardless of the contents of the filename. Anything not inside of quotes or ><>'s will give this error (in spite of the fact that it is inside of a false >#ifdef). Does VMS require the filename to be unquoted? As I indicated in a recent posting, the fact that the SVR3 cpp pays attention within a false #ifdef must be considered a bug. But you misread what you quoted; that was an "#ifdef", not an "#include". It was complaining about the "$" in the identifier passed to "#ifdef". There *is* another bug of the same nature, where SVR3 cpp complains about "#include junk". This is independent of VMS: it's quite legal (in ANSI C, anyway) to say "#define junk " and then "#include junk". Karl W. Z. Heuer (ima!haddock!karl or karl@haddock.isc.com), The Walking Lint