Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site ccice5.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!rochester!ritcv!ccice5!jim From: jim@ccice5.UUCP (James J. Roche) Newsgroups: net.lang.c Subject: structure problem - error or warning? Message-ID: <564@ccice5.UUCP> Date: Fri, 12-Oct-84 12:33:19 EDT Article-I.D.: ccice5.564 Posted: Fri Oct 12 12:33:19 1984 Date-Received: Sat, 13-Oct-84 04:14:20 EDT Distribution: net Organization: CCI Central Engineering, Rochester, NY Lines: 26 Why does the C compiler only give a warning instead of an error on the use of an illegal structure member. The following code example demonstrates what I mean: main() { struct v { int w; }; struct x { int y; } z; z.w = 0; } The C compiler gives the warning "illegal member use: w" on the line z.w = 0. It seems to me that this should be an error. Is this a bug in the C compiler? Thanks in advance for any answers that you can provide. -- Jim Roche Computer Consoles Inc. ccice5:jim (CCI Central Engineering systems only) {rochester, ritcv, ccivax, rayssd, rlgvax}!ccice5!jim (UUCP)