Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!mit-eddie!mit-amt!arwall From: arwall@mit-amt (Anders Wallgren) Newsgroups: comp.sys.mac.programmer Subject: MPW 3.0: Booleans and var #of args... Keywords: mpw boolean warning variable argument Message-ID: <3532@mit-amt> Date: 31 Jan 89 01:55:12 GMT Reply-To: arwall@media-lab.media.mit.edu.UUCP (Anders Wallgren) Distribution: na Organization: MIT Media Lab, Cambridge MA Lines: 33 I have noticed a few irritating things about the lint-like aspects of the MPW 3.0 C compiler...I would appreciate it if some more enlightened person could clue me in as to how I might fix/avoid or just plain live with the following problems: 1. When I compile with the -r and -w2 flags, the compiler complains everytime I assign a Boolean value. The header defines the following: enum {false, true} typedef unsigned char Boolean; Typical code fragment: Boolean myBool; myBool = false; Result when compiled with C -r -w2: Warning #276: This assignment will loose some significant bits. What I suspect happens is that the compiler treats the enumerated type as a short or even a long. The 2.0.2 compiler could be frobbed to treat enumerated types as longs with the -z127 flag, but I didn't know that this was now standard practice...is there a fix for this? 2. Functions with variable numbers of arguments. I would appreciate a lucid example of how to write a function to take a variable number of (in my case) long arguments. Thanks! anders