Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!rutgers!sri-spam!mordor!lll-tis!ptsfa!ihnp4!ihlpm!kmh From: kmh@ihlpm.ATT.COM (Kirk Hoyer) Newsgroups: comp.sys.ibm.pc Subject: Re: Another TURBO C Bug?? Message-ID: <1277@ihlpm.ATT.COM> Date: Fri, 24-Jul-87 09:52:43 EDT Article-I.D.: ihlpm.1277 Posted: Fri Jul 24 09:52:43 1987 Date-Received: Sat, 25-Jul-87 14:13:12 EDT References: <1236@ihlpm.ATT.COM> <3320030@hpsrlc.HP.COM> <1110@lznv.ATT.COM> Organization: AT&T Bell Laboratories - Naperville, Illinois Lines: 26 Summary: This is indeed a bug In article <1110@lznv.ATT.COM>, psc@lznv.ATT.COM (Paul S. R. Chisholm) writes: > In comp.sys.ibm.pc, kmh@ihlpm.ATT.COM (Kirk Hoyer) writes: > > Paul Chisholm correctly pointed out to me that, according to K & R > > section 2.7, floats are cast to doubles when used as function > > arguments. (I should note that the "cc" compiler on the large UNIX > > system I use at work was able to handle the program correctly, even > > though floats and double are different sizes.) > (Maybe floats *are* doubles on your large system???) Floats are not doubles on the large UNIX system where I work. This problem is indeed a bug in Turbo C (and is recognized as such by Borland). They claim to be working on a fix. The reason it is a bug (as was pointed out to me by another netlander): "C convers all float actual parameters to double, so formal parameters declared float have their declaration adjusted to read double." (K&R, C Reference Manual, section 10.1) Turbo C apparently adheres to the first part of this statement, but not the second part. Kirk Hoyer