Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!decwrl!ogicse!schaefer From: schaefer@ogicse.ogi.edu (Barton E. Schaefer) Newsgroups: comp.lang.c Subject: Float-to-double promotion in ANSI C. Message-ID: <11911@ogicse.ogi.edu> Date: 4 Sep 90 21:28:39 GMT References: <2020@engage.enet.dec.com> <6441@wolfen.cc.uow.oz> <11842@ogicse.ogi.edu> Organization: Oregon Graduate Institute (formerly OGC), Beaverton, OR Lines: 19 In article richard@iesd.auc.dk (Richard Flamsholt S0rensen) writes: } In article <11842@ogicse.ogi.edu> schaefer@ogicse.ogi.edu (Barton E. Schaefer) writes: } } >ANSI has nothing to do with it. The only reason that floats are widened } >to double in a function call is because they are widened to double in } >all expression contexts. } ^^^^^^^^^^^^^^^^^^^^^^^ } } Nope. ANSI states .... I was referring to K&R1 C, not ANSI C. (That's why I said "ANSI has nothing to do with it", though I probably should have been more clear.) Since we're on the topic, what does the Rationale say is the reason for promotions in the case of K&R1-style declarations? Is it simple preservation of the old semantics, or is there more to it? Does it give different reasons for widening in the case of variadic functions? -- Bart Schaefer schaefer@cse.ogi.edu