Path: utzoo!attcan!uunet!lll-winken!csd4.milw.wisc.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!hplabs!hpda!hpcupt1!hpisod2!decot From: decot@hpisod2.HP.COM (Dave Decot) Newsgroups: comp.unix.questions Subject: Re: C bug causes double fault Message-ID: <10650046@hpisod2.HP.COM> Date: 21 Mar 89 20:00:50 GMT References: <244@tree.UUCP> Organization: Hewlett Packard, Cupertino Lines: 20 In article <244@tree.UUCP> zarquon@tree.UUCP (Erin Filbert) writes: > >main() > >{ > > float x; > > printf("x = %d", x); > >} In another article, gwyn@smoke.BRL.MIL (Doug Gwyn ) responds: > You'll undoubtedly get a flood of responses correctly pointing out > that conversion of a double (promoted float) argument according to > an int format is incorrect. Use %g or some such format specifier. Well, I "doubt" that Erin will get a flood of responses pointing this out, since it is obvious to almost any reader (by virtue of the fact that the code in question is completely isolated) that Erin already knows this code is incorrect. I don't have an answer to the question Erin asked, either; sorry. Dave