C bug causes double fault
Dave Decot
decot at hpisod2.HP.COM
Wed Mar 22 06:00:50 AEST 1989
In article <244 at tree.UUCP> zarquon at tree.UUCP (Erin Filbert) writes:
> >main()
> >{
> > float x;
> > printf("x = %d", x);
> >}
In another article, gwyn at 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
More information about the Comp.unix.questions
mailing list