Path: utzoo!attcan!uunet!lll-winken!ames!elroy!orion.cf.uci.edu!uci-ics!siam.ics.uci.edu!schmidt From: schmidt@siam.ics.uci.edu (Doug Schmidt) Newsgroups: comp.lang.c Subject: Re: typechecking Keywords: typechecking, lint Message-ID: <3712@paris.ics.uci.edu> Date: 11 Jan 89 22:03:57 GMT References: <19620@uflorida.cis.ufl.EDU> <9335@smoke.BRL.MIL> Sender: news@paris.ics.uci.edu Reply-To: Doug Schmidt Organization: University of California, Irvine - Dept of ICS Lines: 23 In article <9335@smoke.BRL.MIL> gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) writes: |>In article <19620@uflorida.cis.ufl.EDU> thoth@banana.cis.ufl.edu () writes: |>>fprintf("%s : line %d : colon expected.\n",filename,linenumber); |>>Turbo catches this and gcc doesn't. |> |>I'm somewhat surprised that GCC doesn't catch this, since the |>correct prototype in would be |> int fprintf(FILE *, const char *, ...); |>and the compiler should be able to validate the first two argument types. Unfortunately, most people don't change their standard #include files when they install gcc. On my sun, for example, fprintf isn't even mentioned in /usr/include/stdio.h. Therefore, gcc will only catch this if a conscientious gcc installer has modified the standard include files or changed cccp (the gnu cpp) to look in another directory first. Doug Schmidt -- schmidt@ics.uci.edu (ARPA) | Per me si va nella citta' dolente. office: (714) 856-4043 | Per me si va nell'eterno dolore. | Per me si va tra la perduta gente. | Lasciate ogni speranza o voi ch'entrate.