Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!aplcen!uunet!sdrc!thor!scjones From: scjones@thor.UUCP (Larry Jones) Newsgroups: comp.lang.c Subject: Re: Handling of untagged structures by the C compiler Keywords: structures, equivalence, tagged, typecast Message-ID: <185@thor.UUCP> Date: 21 Sep 90 13:12:53 GMT References: <879@gtenmc.UUCP> Distribution: na Organization: SDRC, Cincinnati Lines: 13 In article <879@gtenmc.UUCP>, ravim@gtenmc.UUCP (Ravi K Mandava ( Vox Populi )) writes: > It appears that for every untagged structure declaration/typecast, the > compiler generates a unique tag internally and does not bother to > check for equivalence of the previously encountered structures. Exactly. That is how C is supposed to work according to the ANSI standard. If you want identical structures you have to use a tag or a typedef. ---- Larry Jones UUCP: uunet!sdrc!thor!scjones SDRC scjones@thor.UUCP 2000 Eastman Dr. BIX: ltl Milford, OH 45150-2789 AT&T: (513) 576-2070 Your bangs do a good job of covering up the lobotomy stitches. -- Calvin