VAX (VMS) C / strangeness (serious bug?) w/ prototypes and floats

Joseph Nathan Hall jnh at ece-csc.UUCP
Sat May 28 05:03:27 AEST 1988


In article <3615 at ece-csc.UUCP> jnh at ece-csc.UUCP (Joseph Nathan Hall) writes:
>Pardon me for a couple of typos:  the second 'y =' should be

In fact, pardon me for posting this.  (Our rn isn't retracting postings
properly, sorry.)  The example posted *does* work correctly.  It was an
attempt to determine exactly what the problem was with an application I am
writing.

I have now nailed down the problem.  I'm not sure I would characterize it as
a bug, but I would characterize it as a deficiency.

What was happening was that my prototype, which included some float
declarations, was accidentally followed by an old-style declaration with
no parameter list.

Apparently the second, old-style declaration superseded the new-style
declaration, causing the automatic coercion of floats to doubles.  This
occurred *without* any warning or comment from the compiler.

Sorry, again, for the wasted bandwidth.

-- 
v   v sssss|| joseph hall                      || 201-1D Hampton Lee Court
 v v s   s || jnh at 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 . . . . . . . . . . . 



More information about the Comp.lang.c mailing list