C bug causes double fault

Doug Gwyn gwyn at smoke.BRL.MIL
Mon Mar 20 15:08:54 AEST 1989


In article <244 at tree.UUCP> zarquon at tree.UUCP (Erin Filbert) writes:
>main()
>{
>	float x;
>	printf("x = %d", x);
>}

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.

The reason I'm posting this is so I can include a plea not to post
questions like this to comp.unix.wizards.  That's what
comp.unix.questions is for.  UNIX-WIZARDS is for "wizardly"
discussions (not that it gets very many, but that's what it's
inteded for).  Thanks.



More information about the Comp.unix.questions mailing list