Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mandrill!gatech!ncsuvx!ece-csc!jnh From: jnh@ece-csc.UUCP (Joseph Nathan Hall) Newsgroups: comp.lang.c Subject: VAX (VMS) C / strangeness (serious bug?) w/ prototypes and floats Message-ID: <3614@ece-csc.UUCP> Date: 26 May 88 23:42:56 GMT Reply-To: jnh@ece-csc.UUCP (Joseph Nathan Hall) Organization: North Carolina State University, Raleigh, NC Lines: 33 The program void test(float x, float y, float z) { printf("%f %f %f", x, y, z); } main () { float x, y, z; test(1.0, 2.0, 3.0); x = 1.0; y = 2.0; y = 3.0; test(x, y, z); } produces the quixotic output 1.000000 2.000000 1.000000 3.000000 2.000000 3.000000 on my machine. I'm running VAX C 2.3-024 on VAX/VMS 4.6, on a VAXstation II GPX. Versions of this where test is declared old-style and where x, y, and z in the new-style declaration are double work fine. Am I losing it, or is this as FUBAR as it seems? -- v v sssss|| joseph hall || 201-1D Hampton Lee Court v v s s || jnh@ece-csc.ncsu.edu (Internet) || Cary, NC 27511 v sss || the opinions expressed herein are not necessarily those of my -----------|| employer, north carolina state university . . . . . . . . . . .