Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!munnari.oz.au!goanna!ok From: ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) Newsgroups: comp.lang.c Subject: Re: Why use (void) func() ? Message-ID: <3837@goanna.cs.rmit.oz.au> Date: 26 Sep 90 06:19:31 GMT References: <586@dptechno.UUCP> <3819@goanna.cs.rmit.oz.au> <1990Sep25.163906.4187@zoo.toronto.edu> Organization: Comp Sci, RMIT, Melbourne, Australia Lines: 18 In article <1990Sep25.163906.4187@zoo.toronto.edu>, henry@zoo.toronto.edu (Henry Spencer) writes: > For printf, it is usually a whole lot simpler -- in cases where it matters, > which it often doesn't -- to just check ferror() near the end. I haven't a copy of the final draft of the C standard. Does it explicitly say that errors detected by printf() &co set the stream's error indicator? I've checked the Plauger & Brodie summary, and it says nothing of the kind, nor does any of the UNIX manuals that I've checked. Actually, this is a long-standing gripe of mine: I have never been able to find out which errors printf() *does* detect (negative field width and precision have been defined as non-errors, but what about %@ or the like), and I've certainly never seen any suggestion that format errors set ferror() nor any guarantee that printf() doesn't clear ferror(). What _does_ the standard say about this? -- Fixed in the next release.