Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!udel!mmdf From: ARCHER@segin4.segin.fr Newsgroups: comp.os.minix Subject: float VS double: The return... Message-ID: <16383@nigel.udel.EDU> Date: 10 Apr 90 15:34:12 GMT Sender: mmdf@udel.EDU Lines: 40 Christoph van Wuellen says: CvW> ... WHAT ABOUT CvW> test(a) float a; CvW> { CvW> test1(&a); CvW> } CvW> This certainly passes a pointer to a double, and this can't be changed. CvW> So I ask the C Syntax experts - what do you think a compiler should do CvW> in both cases? I don't think for my compiler :-), but a compiles as a double (sizeof being 8), and *a in test1 has nothing near the same value as a in test: test(a) float a; { a = 0.1; printf("%f\n", a); test1(&a); } test1(a) float *a; { printf("%f\n", *a; } said: 0.1 1.45000 It seems that most compilers do the same kind of thing. So if your compiler enables the user to do some mistakes, you'll lose portability: The program will work compiled with C68, and not with any other compiler. What's more important? Vincent Archer Replies to: archer%segin4.segin.fr@prime.com, NOT archer@segin4.segin.fr