From owner-freebsd-questions Mon Aug 26 11:07:00 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id LAA29088 for questions-outgoing; Mon, 26 Aug 1996 11:07:00 -0700 (PDT) Received: from who.cdrom.com (who.cdrom.com [204.216.27.3]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id LAA29083 for ; Mon, 26 Aug 1996 11:06:58 -0700 (PDT) Received: from eac.iafrica.com (196-7-192-191.iafrica.com [196.7.192.191]) by who.cdrom.com (8.7.5/8.6.11) with SMTP id LAA27922 for ; Mon, 26 Aug 1996 11:06:54 -0700 (PDT) Received: (from rnordier@localhost) by eac.iafrica.com (8.6.12/8.6.12) id UAA00508; Mon, 26 Aug 1996 20:01:34 +0200 From: Robert Nordier Message-Id: <199608261801.UAA00508@eac.iafrica.com> Subject: Re: Programming Question To: hoek@freenet.hamilton.on.ca (Tim Vanderhoek) Date: Mon, 26 Aug 1996 20:01:33 +0200 (SAT) Cc: questions@freebsd.org In-Reply-To: from "Tim Vanderhoek" at Aug 26, 96 10:19:39 am X-Mailer: ELM [version 2.4 PL24 ME8a] Content-Type: text Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Tim Vanderhoek wrote: > > On Mon, 26 Aug 1996, Robert Nordier wrote: > > > Note that 'typedef' doesn't create types, just synonyms for existing > > types. So the assignment = doesn't involve a type > > conflict in any sense. > > If I set a typedef, it's because I want all variables in a given group to > be that type. I might later decide to change that (ie. int isn't quite > large enough when someone decides to check a doc with 66000 words; let's > try long int). All of a sudden, a bunch of errors will spew all over the > place. I'd prefer to know about them now, rather than later. The > exception, of course, is when passing a variable of type (where > == ) to a library function expecting an int. In all other places a > warning would be nice... :( It's a valid concern. It probably just goes too much against the deliberately weakly typed philosophy of C to require this kind of help from compilers. Could certainly be useful as a lint option, though. -- Robert Nordier