Path: utzoo!attcan!uunet!know!zaphod.mps.ohio-state.edu!wuarchive!usc!apple!sun-barr!newstop!sun!amdcad!mozart.amd.com!proton!tim From: tim@proton.amd.com (Tim Olson) Newsgroups: comp.lang.c Subject: Re: float to double pain Message-ID: <1990Dec11.173043.8171@mozart.amd.com> Date: 11 Dec 90 17:30:43 GMT References: <4268@ritcsh.cs.rit.edu> <9919@hydra.Helsinki.FI> Sender: usenet@mozart.amd.com (Usenet News) Reply-To: tim@amd.com (Tim Olson) Organization: Advanced Micro Devices, Austin, TX Lines: 25 In article <9919@hydra.Helsinki.FI> wirzeniu@cs.Helsinki.FI (Lars Wirzenius) writes: | In article <4268@ritcsh.cs.rit.edu> you write: | >t(f1) | >float f1; | >{ | > check(&f1); | >} | | For old-style function definitions arguments of type float are silently | rewritten to be of type double. Correct. | So &f1 is actually a pointer to a | double, which is inconsistent with check's expectation of a pointer to a | float. This isn't right -- type-rewriting does not take place for pointers; &f1 is still a pointer to a float. -- -- Tim Olson Advanced Micro Devices (tim@amd.com)