Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site rlgvax.UUCP Path: utzoo!watmath!clyde!bonnie!akgua!sdcsvax!dcdwest!ittvax!decvax!genrad!panda!talcott!harvard!seismo!rlgvax!guy From: guy@rlgvax.UUCP (Guy Harris) Newsgroups: net.lang.c Subject: Re: lint, pointers, 0 (what else?) Message-ID: <449@rlgvax.UUCP> Date: Sat, 9-Feb-85 13:23:46 EST Article-I.D.: rlgvax.449 Posted: Sat Feb 9 13:23:46 1985 Date-Received: Mon, 11-Feb-85 04:47:42 EST References: <8097@brl-tgr.ARPA> Organization: CCI Office Systems Group, Reston, VA Lines: 25 > Does the standard require compilers to generate warnings when > they have to generate a cast of function arguments? The potential for > truly sloppy coding seems enormous with this change. No, it doesn't have any such requirement; arguably, it's the same as double d; int i; d = i; which also requires a coercion. I see your point that, unlike this case, where both variables are in the same module and it is assumed that the program knows what they're doing, programmer A may simply not realize that the program wants a "double", or may get the number or order of the arguments wrong, when calling the procedure written by programmer B. If the coercion "doesn't make sense" (e.g., the routine expects a "struct frobozz *" and is being passed a "struct death *"), PCC, at least, will complain (as it currently does with similar assignments). If the coercion isn't doable (e.g., the routine expects a "struct frobozz" and is being passed an "int"), a reasonable compiler will complain and won't generate code. Guy Harris {seismo,ihnp4,allegra}!rlgvax!guy