Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!gatech!dcatla!holos0!lbr From: lbr@holos0.uucp (Len Reed) Newsgroups: comp.unix.xenix Subject: Function Prototypes and SCO Xenix-386 C Keywords: C, ANSI Message-ID: <1989Jul27.171720.1948@holos0.uucp> Date: 27 Jul 89 17:17:20 GMT Reply-To: lbr@holos0.UUCP (Len Reed) Distribution: usa Organization: Holos Software, Atlanta Lines: 28 After several months in the land of MS-DOS, I'm back working on the SCO Xenix 386 system. One of the pluses (and there are few) of working on MS-DOS was the ANSI extensions of Microsoft C 5.1. I really got to like strong typing of arguments. The Xenix-386 cc command will not support function prototypes if I use -M3 (generate 80386 code). This certainly means that cc is forking a different compiler, and an older one, for -M2 than for -M3. The -M3 version generates lots of syntax error messages for a line like: void my_function ( char *, int **, struct foo *, int); I am unhappy that the compiler for the new machine is more backward than the 80286 version. An 80386 compiler should be far easier to do since you don't have to worry about near and far and 64K segments and stupid register restrictions like "you can say [BP+DI] but not [BP+CX]." Even worse, though, is the documentation. The manuals go on and on about ANSI and function prototypes, but nowhere do they say anything about the stuff not working with -M3. The compiler switches are documented in several places, and every list is different. What's the deal here? Am I missing the fourth list of compiler switches that has the magic key? Is SCO doing anything about this? -- Len Reed Holos Software, Inc. Voice: (404) 496-1358 UUCP: ...!gatech!holos0!lbr