Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!princeton!orsvax1!pyrnj!caip!cbmvax!higgin From: higgin@cbmvax.cbm.UUCP (Paul Higginbottom) Newsgroups: net.micro.amiga Subject: Re: A call for help with Manx C Message-ID: <224@cbmvax.cbmvax.cbm.UUCP> Date: Sun, 11-May-86 18:00:19 EDT Article-I.D.: cbmvax.224 Posted: Sun May 11 18:00:19 1986 Date-Received: Tue, 13-May-86 03:29:18 EDT References: <670@watcgl.UUCP> Reply-To: higgin@cbmvax.UUCP (Paul Higginbottom) Distribution: net Organization: Commodore Technology, West Chester, PA Lines: 48 In article <670@watcgl.UUCP> fdfishman@watcgl.UUCP (Flynn D. Fishman) writes: >When I compile several of the examples given in the Amiga manuals >using Aztec C68K 3.20a I get conversion warnings > Sample Output: > > OpenLibrary("intuition.library",INTUITION_REV); > ^ >window.c:19: WARNING 121: ptr/int conversion: > NewWindow.Title = "A Simple Window"; > ^ >window.c:29: WARNING 124: invalid ptr/ptr assignment: > iff(( Window = (struct Window *)OpenWindow(&NewWindow))==NULL) > ^ >window.c:44: WARNING 121: ptr/int conversion: > Thanks in advance >-- > > FDFISHMAN (Flynn D. Fishman) Mr. Fishman: The examples in the Amiga manuals rarely 'extern' anything assuming ints (32 bit) and pointers can be intermixed. This is dandy if you compile using the +l option on the Manx system, and ignore the warnings. Without the +l option, you'll have the compiler try to make pointers from 16 bit quantities, and this will provide you with some unamusing Guru numbers when you try to run the program. If external references had been declared as such, most of the casting would be unnecessary, e.g: extern struct Window *OpenWindow(); struct Window *W; if ((W = OpenWindow(ANewWindow)) == NULL) { etc. The above fragment would not cause such warnings. Source that doesn't declare routines as returning what they actually do has caused grief for some people using the Manx system and subsequent grumbling about said system on the nets. I think this grumbling is unfair because the Aztec system generates code that is usually 40% smaller than the same program compiled under Lattice, and noticably faster. Paul Higginbottom. Disclaimer: I do not work for Commodore, and my opinions are at least my own.