Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!unmvax!bbx!bbxsda!scott From: scott@bbxsda.UUCP (Scott Amspoker) Newsgroups: comp.lang.c Subject: Re: Compilers and programming style (was Re: A question of style) Message-ID: <544@bbxsda.UUCP> Date: 10 Jan 90 22:40:22 GMT References: <2283@dataio.Data-IO.COM> <534@bbxsda.UUCP> <2288@dataio.Data-IO.COM> Reply-To: scott@bbxsda.UUCP (Scott Amspoker) Organization: Basis International, Albuquerque, NM Lines: 30 In article <2288@dataio.Data-IO.COM> bright@dataio.Data-IO.COM (Walter Bright) writes: >In article <534@bbxsda.UUCP> scott@bbxsda.UUCP (Scott Amspoker) writes: > bright@dataio.Data-IO.COM (Walter Bright) writes: ><<<*p; /* has side effects and must not be optimized away */ > >Should be something like: > MOV BX,p > MOV AX,[BX] I don't mean to be a pain in the butt but I want to make sure I understand what's going on. Several posters have responded with similar code examples. *Is this documented in the ANSI spec?* It's a nice "feature" and all, but.... (The reason I ask is that there are usually two kinds of postings in this newsgroup - those that discuss C as it really is (which I care about) and those that discuss C as someone would like it to be (which are a waste of my time). I sometimes have trouble telling the two apart. I currently don't have the ANSI draft at my disposal but I do have compilers that claim to be ANSI compatible with reasonably good documentation. None of this discusses any semantics for "*p;".) -- Scott Amspoker Basis International, Albuquerque, NM (505) 345-5232 unmvax.cs.unm.edu!bbx!bbxsda!scott