Path: utzoo!utgpu!water!watmath!clyde!cbosgd!ihnp4!inuxc!iuvax!bsu-cs!dhesi From: dhesi@bsu-cs.UUCP (Rahul Dhesi) Newsgroups: comp.lang.c Subject: Re: comma operator Message-ID: <1934@bsu-cs.UUCP> Date: 23 Jan 88 20:14:46 GMT References: <3819@sigi.Colorado.EDU> <8599@ism780c.UUCP> <1866@bsu-cs.UUCP> <4037@june.cs.washington.edu> <10293@mimsy.UUCP> Reply-To: dhesi@bsu-cs.UUCP (Rahul Dhesi) Organization: CS Dept, Ball St U, Muncie, Indiana Lines: 21 In article <10293@mimsy.UUCP> chris@mimsy.UUCP (Chris Torek) writes: >The *only* way to guarantee proper operation >under dpANS rules is to write > > volatile int *ctlr_p = DISK_CTRL_REGISTER; > volatile int *out_p = DISK_OUT_REGISTER; Or, for the sake of argument and abandoning all hope of efficiency, one could say: extern unsigned *read_disk_ctrl_register (void); extern void write_disk_ctrl_register (unsigned); If compiled separately, and until globally optimizng *linkers* are developed, even a globally optimizing compiler really has no choice but to respect an order such as: write_disk_ctrl_register (RESET); /* must be done first */ status = read_disk_ctrl_register (); /* must be done second */ -- Rahul Dhesi UUCP: !{iuvax,pur-ee,uunet}!bsu-cs!dhesi