Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!decwrl!pa.dec.com!bacchus!mwm From: mwm@pa.dec.com (Mike (My Watch Has Windows) Meyer) Newsgroups: comp.sys.amiga.programmer Subject: Re: Manx/Lattice ENOUGH IS ENOUGH Message-ID: Date: 28 May 91 18:54:02 GMT References: <1991May26.022108.7901@sugar.hackercorp.com> <1991May26.172439.2021@NCoast.ORG> <1991May27.125456.27018@sugar.hackercorp.com> Sender: news@pa.dec.com (News) Organization: Missionaria Phonibalonica Lines: 35 In-Reply-To: cg@ami-cg.UUCP's message of 28 May 91 06:17:46 GMT In article cg@ami-cg.UUCP (Chris Gray) writes: In article <1991May27.125456.27018@sugar.hackercorp.com> peter@sugar.hackercorp.com writes: >Well, I'm trying to convert a program full of things like: > > int a(char b, float c); > > ... > > int a(b, c) > char b; > float c; > >These are not compatible declarations. Because of the promotion rules, the >latter is equivalent to: > > int a(int b, double c); Hmm. I seem to recall that the presence of an ANSI prototype for a given function would convert a following old-style definition of the function into the given ANSI form. Thus, in the above, it would be just the same as if the function definition had been int a(char b, float c) { ... This is what SAS did about it. Manx did it the way Peter described it. I think ANSI left the case undefined, so both compilers are "right." I prefer the way SAS did it - it makes building code that ports between prototyped & non-prototyped environments much more straightforward.