Path: utzoo!attcan!uunet!lll-winken!ames!mailrus!sharkey!cfctech!rphroy!tkacik From: tkacik@rphroy.UUCP (Tom Tkacik) Newsgroups: comp.lang.c Subject: Re: typechecking Keywords: typechecking, lint Message-ID: <7178@rphroy.UUCP> Date: 11 Jan 89 17:24:22 GMT References: <19620@uflorida.cis.ufl.EDU> <9335@smoke.BRL.MIL> Reply-To: tkacik@rphroy.UUCP (Tom Tkacik) Organization: GM Research Labs, Warren, MI Lines: 21 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, GCC does not come with its own stdio.h file. The standard one is typically used, and does not have function prototypes. All GCC sees for fprintf is int fprintf(); if that. Usually, as on our Suns, fprintf is not even listed in stdio.h. --- Tom Tkacik GM Research Labs, Warren MI 48090 uunet!umix!rphroy!megatron!tkacik