Xref: utzoo comp.lang.c:17038 comp.bugs.4bsd:1230 Path: utzoo!attcan!uunet!lll-winken!csd4.milw.wisc.edu!mailrus!tut.cis.ohio-state.edu!rutgers!cmcl2!rna!dan From: dan@rna.UUCP (Dan Ts'o) Newsgroups: comp.lang.c,comp.bugs.4bsd Subject: C preprocessor: undefined control Message-ID: <435@rna.UUCP> Date: 19 Mar 89 02:38:25 GMT Organization: Rockefeller University - Neurobiology Lines: 34 I'm sure this must have been covered before, but I haven't seen it myself... I am writing a (large) C program that runs under both UNIX and MSDOS. I am using the Microsoft 5.0 C compiler for MSDOS and 4.3BSD's CC for VAX UNIX. There is a portion of code that only is relevant under MSDOS. It is surrounded by #ifdef MSDOS -> #endif. Within that code, I use MSC's #pragma loop_opt(off) to suppress the loop optimization of a (volatile) device register. 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 I naturally see how this could happen, although I do consider it a bug (what does ANSI say about this sort of thing). Is there any way around this ? (I know I could write the C code such that the #pragma isn't necessary... that's not an answer). Please email responses. Thanks. Cheers, Dan Ts'o 212-570-7671 Dept. Neurobiology dan@rna.rockefeller.edu Rockefeller Univ. ...cmcl2!rna!dan 1230 York Ave. rna!dan@nyu.edu NY, NY 10021 tso@rockefeller.arpa tso@rockvax.bitnet