Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/5/84; site yale.ARPA
Path: utzoo!linus!decvax!yale!dglasser
From: dglasser@yale.ARPA (Danny Glasser)
Newsgroups: net.lang.c
Subject: Type checking: shouldn't lint/cc complain?
Message-ID: <5344@yale.ARPA>
Date: Tue, 9-Oct-84 11:47:42 EDT
Article-I.D.: yale.5344
Posted: Tue Oct  9 11:47:42 1984
Date-Received: Thu, 11-Oct-84 04:23:53 EDT
Distribution: net
Organization: Yale University CS Dept., New Haven CT
Lines: 27

Let's say I have the following C program:

/* Beginning */
typedef int FOO ;
typedef int BAR ;

#define XXX (FOO) 1

main()
{
	BAR fff ;

	fff = XXX ;
}
/* End */

When I run lint or cc on this program (on 4.1BSD or 4.2BSD), I
get no complaints about the fact that fff is a variable of type
BAR and it is being assigned a value of type FOO.  Now I wouldn't
want the C compiler to crap out on this code (as Pascal probably
would with the equivalent program), but shouldn't the compiler
(or at least lint) complain about this?

				    -- Danny Glasser
				    {decvax,allegra,ima}!yale!dglasser
				    Glasser-Daniel@YALE.ARPA
					[NOT dglasser@YALE.ARPA]