Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rochester!pt.cs.cmu.edu!ius2.cs.cmu.edu!edw From: edw@ius2.cs.cmu.edu (Eddie Wyatt) Newsgroups: comp.lang.c Subject: Re: Structure type mismatch Message-ID: <1095@ius2.cs.cmu.edu> Date: Fri, 10-Apr-87 12:38:12 EST Article-I.D.: ius2.1095 Posted: Fri Apr 10 12:38:12 1987 Date-Received: Sun, 19-Apr-87 09:30:54 EST References: <6821@brl-adm.ARPA> Organization: Carnegie-Mellon University, CS/RI Lines: 38 In article <6821@brl-adm.ARPA>, dsill@NSWC-OAS.arpa writes: > Rich Chomiczewski, AT&T - ERC, Princeton NJ wrote: > > >Given the following: > > >struct { > > int a,b; > >} foo() > >{ > > struct { > > int a,b; > > } c; > > > > return c; > >} > > Compiler complains about type mismatch. This is because the two structures, > even though they are equivalent, are not of the same type. Try this instead: > I always thought C used structure equivalence and not name equivalence. In the example, both the return argument and declared function are structurally equivalent, right? P.S. I'll get back to FP argument when I have time. I in the midst debugging an asycronous processing problems. -- Eddie Wyatt They say there are strangers, who threaten us In our immigrants and infidels They say there is strangeness, too dangerous In our theatres and bookstore shelves Those who know what's best for us- Must rise and save us from ourselves Quick to judge ... Quick to anger ... Slow to understand... Ignorance and prejudice and fear [all] Walk hand in hand. - RUSH