A lint question
Rahul Dhesi
dhesi at bsu-cs.UUCP
Tue Dec 6 02:37:39 AEST 1988
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 at devon.UUCP> paul at 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: <backbones>!{iuvax,pur-ee}!bsu-cs!dhesi
More information about the Comp.lang.c
mailing list