Xref: utzoo comp.unix.microport:3002 comp.unix.questions:12335 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!agate!helios.ee.lbl.gov!ncis.llnl.gov!lll-winken!uunet!portal!cup.portal.com!dbell From: dbell@cup.portal.com (David J Bell) Newsgroups: comp.unix.microport,comp.unix.questions Subject: Re: C bug causes double fault Message-ID: <16066@cup.portal.com> Date: 21 Mar 89 06:24:16 GMT References: <244@tree.UUCP> <9884@smoke.BRL.MIL> Distribution: na Organization: The Portal System (TM) Lines: 21 >In article <244@tree.UUCP> zarquon@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. OK, *WIZARDS*, now answer Erin's real question; I'm sure the original error of printing the float )OK, double...) argument as int was recognized. Now, why does the fragile compiler bring down the system?