Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site kobold.UUCP Path: utzoo!watmath!clyde!floyd!harpo!eagle!mit-vax!grkermit!masscomp!kobold!tjt From: tjt@kobold.UUCP Newsgroups: net.lang.c Subject: Re: "#if sizeof(char *) < sizeof(int)" Message-ID: <273@kobold.UUCP> Date: Wed, 8-Feb-84 12:48:58 EST Article-I.D.: kobold.273 Posted: Wed Feb 8 12:48:58 1984 Date-Received: Fri, 10-Feb-84 03:46:58 EST References: <1623@rlgvax.UUCP> <451@mprvaxa.UUCP>, <925@druxy.UUCP> <357@hocda.UUCP> Organization: Masscomp, Westford, MA Lines: 16 So whats wrong with: if ((sizeof(char *) > sizeof(int)) { . . . } The compiler should evaluate the conditional at compile time and skip the dead code (although many UNIX C compilers rely on the peephole optimizer to remove the dead code). #ifdef and so on should only be necessary for conditionally including #define's, #include's and declarations which cannot possibly be handled by an ordinary if. -- Tom Teixeira, Massachusetts Computer Corporation. Westford MA ...!{ihnp4,harpo,decvax}!masscomp!tjt (617) 692-6200 x275