Xref: utzoo comp.lang.c:17102 comp.bugs.4bsd:1235 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!hc!lanl!cmcl2!rna!dan From: dan@rna.UUCP (Dan Ts'o) Newsgroups: comp.lang.c,comp.bugs.4bsd Subject: Re: C preprocessor: undefined control Message-ID: <437@rna.UUCP> Date: 22 Mar 89 03:01:57 GMT References: <435@rna.UUCP> <1989Mar20.190946.23190@utzoo.uucp> Reply-To: dan@rna.UUCP (Dan Ts'o) Organization: Rockefeller University Neurobiology Lines: 34 In article <1989Mar20.190946.23190@utzoo.uucp> henry@utzoo.uucp (Henry Spencer) writes: )In article <435@rna.UUCP> dan@rna.UUCP (Dan Ts'o) writes: )) ... The 4.3BSD complains about the #pragma, even though it should be ))excluded entirely since the #ifdef MSDOS is not satisfied: )) ))#ifdef MSDOS )) ... C code ... ))#pragma loop_opt(off) )) while(...) )) ... ))#endif )) )As I read the fine print in the Oct. draft, an unrecognized thing that )looks like a directive, in a section that is being skipped, is not in )fact a directive and therefore should not draw a complaint, except perhaps )a warning message from an excessively-clever compiler. ) )As to how to get around it, try putting white space in front of the # )that starts the #pragma. An ANSI-compatible compiler will recognize )it even so, and with luck your MeSsDOS compiler will too, but the old )compilers won't see it unless the # is first on the line. Thanks to everyone that responded. As far as the "4.3BSD complains", I should have been more specific: The original 4.3BSD VAX C compiler not only complains, it gives up entirely. I haven't tried the 4.3BSD Tahoe compiler. As far as how to get around it, Henry's suggestion, which a couple of others also offered, though kludgy, was the most satisfactory -- and it works. That is, simply putting white space in front of the #pragma cause the 4.3BSD C compiler to ignore it (that is, the pre-processor doesn't realize that it should interpret the #pragma). ...Which reminds me... Remember the days when the pre-processor wasn't even invoked unless the first CHARACTER of the C source file was #. The good ol' daze...