Path: utzoo!attcan!uunet!husc6!rutgers!rochester!pt.cs.cmu.edu!b.gp.cs.cmu.edu!ralf From: ralf@b.gp.cs.cmu.edu (Ralf Brown) Newsgroups: comp.sys.ibm.pc Subject: Re: TC2.0 bugfree ? Message-ID: <4092@pt.cs.cmu.edu> Date: 23 Jan 89 02:31:22 GMT References: <537@cs-spool.calgary.UUCP> <2041@sun.soe.clarkson.edu> Organization: Carnegie-Mellon University, CS/RI Lines: 18 In article <2041@sun.soe.clarkson.edu> jk0@sun.soe!clutx.clarkson.edu.UUCP writes: } I compiled something like this with Turbo C and 4.2 BSD cc: [sample code omitted] } This is JUST an example, but TC didn't give me ANY warnings, but } 4.2 BSD figured out that my simple return at the end of the function } was inconsistent. >I wonder why they don't issue warnings like this? Do you have warnings turned on (-w)? I put the code thru TC2.0, and it definitely warned that a value should be returned at the end of the function. Adding a return; at the end of the function generates the different warning that "Both return and return of a value used in function hello" -- {harvard,uunet,ucbvax}!b.gp.cs.cmu.edu!ralf -=-=- AT&T: (412)268-3053 (school) ARPA: RALF@B.GP.CS.CMU.EDU |"Tolerance means excusing the mistakes others make. FIDO: Ralf Brown at 129/31 | Tact means not noticing them." --Arthur Schnitzler BITnet: RALF%B.GP.CS.CMU.EDU@CMUCCVMA -=-=- DISCLAIMER? I claimed something? --