Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!husc6!cmcl2!lanl!beta.lanl.gov.!mikeg From: mikeg@c3.c3.lanl.gov (Michael P. Gerlek) Newsgroups: comp.lang.c Subject: How to force cpp to abort? Message-ID: Date: 12 Aug 90 00:00:36 GMT Sender: news@lanl.gov Distribution: comp Organization: Los Alamos National Laboratory, New Mexico Lines: 32 I'm writing some machine dependent code... #if defined(__convex__) (do Convex stuff) #else #if defined(cray) (do Cray stuff) #else #if defined(sun) (do Sun stuff) #else (oops) /* force abort */ #endif #endif #endif Question: if the code is compiled on, say, a Vax, how do I force the compiler (or perhaps cpp) to abort in the "oops" block above? Sure, I could throw in some syntactically bad code and force a syntax error, but that's not really very clean. Sure, too, I could conditonally compile in an fprintf(stderr,"Machine not supported"), but the code would have to be run - I want to cleanly abort at compile-time. Suggestions? [ M.P.Gerlek (mikeg@lanl.gov) - [ Los Alamos Nat'l Lab / Merrimack College - [ Disclaimer: Yes, Mom, I'll play nice. - [ "My other machine's a multi-threaded YMP." -