Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site sdcsla.UUCP Path: utzoo!linus!decvax!ittvax!dcdwest!sdcsvax!sdcsla!west From: west@sdcsla.UUCP Newsgroups: net.lang.c Subject: Re: Who says infinite structures are impossible? Message-ID: <620@sdcsla.UUCP> Date: Thu, 26-Jul-84 18:33:20 EDT Article-I.D.: sdcsla.620 Posted: Thu Jul 26 18:33:20 1984 Date-Received: Sat, 28-Jul-84 06:04:48 EDT References: <225@siemens.UUCP> Organization: UC San Diego: Institute for Cognitive Science Lines: 27 Hey, that one was fun with dbx ("print s")!! But seriously, it is clearly a compiler fault, since the "C Reference Manual" clearly states (section 8.5, page 197): ... names of tags and members must be mutually distinct. The example structure (given here struct x { int a; struct x { int b,c;} f; } s; for clarity) contains a structure with the same structure tag name as is given the whole structure. No scoping of these names within structures is implied, nor should any be inferred. It is unfortunate that both the C compiler (cc on 4.2bsd) and lint let this go by, and in fact give misleading warnings about "s.f.b" and "s.f.c" having illegal members. In short, I'd never belong to any structure that had itself as a member. -- Larry West, UC San Diego, Institute for Cognitive Science -- decvax!ittvax!dcdwest!sdcsvax!sdcsla!west -- ucbvax!sdcsvax!sdcsla!west -- west@NPRDC {{ NOT: [aarg!] }}