Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!rutgers!iuvax!bsu-cs!dhesi From: dhesi@bsu-cs.UUCP (Rahul Dhesi) Newsgroups: comp.lang.c Subject: Re: A lint question Message-ID: <4960@bsu-cs.UUCP> Date: 5 Dec 88 16:37:39 GMT References: <4881@bsu-cs.UUCP> <1165@devon.UUCP> Reply-To: dhesi@bsu-cs.UUCP (Rahul Dhesi) Organization: CS Dept, Ball St U, Muncie, Indiana Lines: 31 I said: (Sigh.) You can't always make the same code lint properly under both SVR2 and 4.3BSD because of this. Damned if I do, unsigned if I don't. In article <1165@devon.UUCP> paul@devon.UUCP (Paul Sutcliffe Jr.) writes: > #ifdef BSD > #define SIZE int > #else > #define SIZE unsigned int > #endif Well, let's respond to this note of despair: (Sigh.) You can't always make the same code compile properly under both C and Pascal. Sure you can: #ifdef LANG_C ... C code ... #else /* LANG_PASCAL */ ... Pascal code ... #endif Now we just run this through a preprocessor (of which there are plenty, some free, others copylefted, and one in /lib/cpp) before submitting it to our favorite compiler. The question still remains: are we compiling the same code, or different code? -- Rahul Dhesi UUCP:!{iuvax,pur-ee}!bsu-cs!dhesi