float to double pain
Tim Olson
tim at proton.amd.com
Wed Dec 12 04:30:43 AEST 1990
In article <9919 at hydra.Helsinki.FI> wirzeniu at cs.Helsinki.FI (Lars Wirzenius) writes:
| In article <4268 at 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 at amd.com)
More information about the Comp.lang.c
mailing list