Path: utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!ames!nrl-cmf!mailrus!uflorida!novavax!proxftl!bill From: bill@proxftl.UUCP (T. William Wells) Newsgroups: comp.lang.c Subject: Re: Overlapping assignments Message-ID: <724@proxftl.UUCP> Date: 8 Sep 88 00:48:49 GMT References: <3008@tekcrl.CRL.TEK.COM> Reply-To: bill@proxftl.UUCP (T. William Wells) Organization: Proximity Technology, Ft. Lauderdale Lines: 19 Summary: Expires: Sender: Followup-To: Distribution: Keywords: In article <3008@tekcrl.CRL.TEK.COM> barts@tekcrl.CRL.TEK.COM (Bart Schaefer) writes: : Suppose I make the following declaration: : : [declaration omitted] : : Given that declaration, is the following assignment guaranteed to work : for any (integer) values of i and j (assuming a compiler that supports : structure assignment)? : : some_node.n_cell[i] = some_node.n_vec.args[j]; No. If there is any possibility of overlap, you can be that some compiler will move them in such a way as to make you miserable. The new standard specifically states that the implementation does not have to do such assignments correctly. See 3.3.16.1. --- Bill novavax!proxftl!bill