Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!orchid!atbowler From: atbowler@orchid.UUCP Newsgroups: comp.lang.c Subject: Re: Passing (char *) NULL to printf to match %s Message-ID: <10254@orchid.waterloo.edu> Date: Fri, 14-Aug-87 16:10:41 EDT Article-I.D.: orchid.10254 Posted: Fri Aug 14 16:10:41 1987 Date-Received: Sat, 15-Aug-87 16:43:46 EDT References: <166@qetzal.UUCP> <157@hobbes.UUCP> <875@bsu-cs.UUCP> <24247@sun.uucp> Reply-To: atbowler@orchid.waterloo.edu (Alan T. Bowler [SDG]) Organization: U. of Waterloo, Ontario Lines: 10 In article <24247@sun.uucp> guy%gorodish@Sun.COM (Guy Harris) writes: >Unless the ANSI C spec changes before it becomes official, it will >STILL be a bad idea to pass NULL to "printf". I certainly hope that the standard does not ever do that. Sun's approach of faulting gets bugs in programs detected much earlier in the development cycle. Printing "(null)" is roughly equivalent to quietly mapping an out of bound subscript to zero. It "cures" the problem of programs faulting, instead they just quietly screw up.