Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!caen!kuhub.cc.ukans.edu!markv From: markv@kuhub.cc.ukans.edu Newsgroups: comp.sys.amiga.programmer Subject: Re: Manx/Lattice ENOUGH IS ENOUGH Message-ID: <1991May28.165437.31104@kuhub.cc.ukans.edu> Date: 28 May 91 21:54:37 GMT References: <1991May26.022108.7901@sugar.hackercorp.com> <1991May26.172439.2021@NCoast.ORG> <1991May27.125456.27018@sugar.hackercorp.com> Organization: University of Kansas Academic Computing Services Lines: 31 >>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 Correct. ANSI says that promotion only occurs with old style declarations in the absence of a prototype. SAS does this, so does VAX C, MSC 5.1/6.0, Turbo C/C++/Borland C/C++, and cc on AIX. (These are the "only" ANSI compilers I've used :-)). If Manx promotes the parameters in the presence of a prototype, then it is Manx's error. -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Mark Gooderum Only... \ Good Cheer !!! Academic Computing Services /// \___________________________ University of Kansas /// /| __ _ Bix: mgooderum \\\ /// /__| |\/| | | _ /_\ makes it Bitnet: MARKV@UKANVAX \/\/ / | | | | |__| / \ possible... Internet: markv@kuhub.cc.ukans.edu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~