Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/5/84; site tove.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!godot!harvard!seismo!umcp-cs!tove!mark
From: mark@tove.UUCP (Mark Weiser)
Newsgroups: net.lang.c
Subject: Re: structure problem - error or warning?
Message-ID: <15@tove.UUCP>
Date: Sat, 13-Oct-84 22:18:41 EDT
Article-I.D.: tove.15
Posted: Sat Oct 13 22:18:41 1984
Date-Received: Mon, 15-Oct-84 01:39:53 EDT
References: <564@ccice5.UUCP>
Distribution: net
Organization: U of Maryland, Laboratory for Parallel Computation, C.P., MD
Lines: 11

> Why does the C compiler only give a warning instead of an error on the
> use of an illegal structure member. 

That's no bug, that's a feature!  It is a kind of cheap union, 
in which you can pick apart anything as though it were a structure.
Now that C has real unions it is unnecessary, but there is a lot of
C out there that depends on this "bug".
-- 
Spoken: Mark Weiser 	ARPA:	mark@maryland
CSNet:	mark@umcp-cs 	UUCP:	{seismo,allegra}!umcp-cs!mark
U.S.: Computer Science Dept., University of Maryland, College Park, MD 20742