Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!elroy.jpl.nasa.gov!lll-winken!aunro!alberta!ami-cg!cg From: cg@ami-cg.UUCP (Chris Gray) Newsgroups: comp.sys.amiga.programmer Subject: Re: Manx/Lattice ENOUGH IS ENOUGH Message-ID: Date: 28 May 91 06:17:46 GMT References: <1991May26.022108.7901@sugar.hackercorp.com> <1991May26.172439.2021@NCoast.ORG> <1991May27.125456.27018@sugar.hackercorp.com> Organization: Not an Organization Lines: 30 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) { ... I believe this was done so that people could phase-in ANSI-fication by building header files that supply prototypes for all of their functions, and thus having an easy way to get the protection of prototypes. I may be out of date on this, however. I remember it because the C compiler I was writing at the time didn't manage it (it's since been updated by others). -- Chris Gray alberta!ami-cg!cg or cg%ami-cg@scapa.cs.UAlberta.CA