Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site siemens.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!hao!hplabs!tektronix!uw-beaver!cornell!vax135!houxz!houxm!mhuxl!ulysses!allegra!princeton!eosp1!siemens!wws From: wws@siemens.UUCP (William W Smith) Newsgroups: net.lang.c Subject: Who says infinite structures are impossible? Message-ID: <225@siemens.UUCP> Date: Mon, 23-Jul-84 08:53:53 EDT Article-I.D.: siemens.225 Posted: Mon Jul 23 08:53:53 1984 Date-Received: Sat, 28-Jul-84 00:38:13 EDT Organization: Siemens RTL Princeton, NJ Lines: 21 In the Berkeley Unix C compiler, the following declaration creates an infinitely recursive structure: struct x { int a; struct x { int b,c;} f; } s; The compiler is more than happy to generate code for: s.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.a = 727; and, sizeof(struct x) returns 12 on a VAX. Can anybody find a good use for this "feature?" Bill Smith princeton!siemens!wws