Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!rutgers!sri-spam!sri-unix!hplabs!tektronix!tekgen!tekigm!phils From: phils@tekigm.UUCP (Phil Staub) Newsgroups: net.micro.amiga Subject: Manx Compiler +l bug(?) Message-ID: <988@tekigm.UUCP> Date: Fri, 24-Oct-86 02:48:56 EDT Article-I.D.: tekigm.988 Posted: Fri Oct 24 02:48:56 1986 Date-Received: Sat, 25-Oct-86 06:41:34 EDT Organization: Tektronix Inc., Beaverton, Or. Lines: 80 < ---------------------------> While trying to compile the MicroEMACS 3.7 sources with the Manx 3.20a compiler, I ran into a problem with the #if'd code used to select machine/compiler/os environment. Problem: Error #109's to say that the if values need to be integer constants, but only if I compile with 32 bit ints. Compilation with 16 bit ints works as expected. To reproduce: Compile the program below with cc foo.c This works, while cc +l foo.c fails. Questions: 1. Has anyone else seen this behavior? 2. Has anyone found a work around? 3. Does the 3.30 compiler do the same thing? Thanks, Phil Staub Tektronix, Inc. ISI Engineering P.O. Box 3500 Vancouver, Washington 98668 C1-904, (206) 253-5634 ..tektronix!tekigm!phils ------------------------------------------------------------------------------- /* set/clear these values to turn the messages below on or off */ #define A 0 #define B 0 #define C 0 #define D 0 #define E 0 #define F 0 main() { #if A printf("A is set\n"); #endif #if B printf("B is set\n"); #endif #if C printf("C is set\n"); #endif #if A | B printf("A is set\n"); printf("B is set\n"); #endif #if A | C printf("A is set\n"); printf("C is set\n"); #endif #if B | C printf("B is set\n"); printf("C is set\n"); #endif #if A | B | C printf("A is set\n"); printf("B is set\n"); printf("C is set\n"); #endif #if A | B | C | (D & (E | F)) printf("composite\n"); #endif }