From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,cbd507df3efa824b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-01-31 21:28:04 PST Path: supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!194.176.220.130!newsfeed.icl.net!dispose.news.demon.net!news.demon.co.uk!demon!pogner.demon.co.uk!zap!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Help with Atomic_Components and whole array assignment Date: 30 Jan 2001 21:30:03 +0000 Organization: CodeFella Message-ID: References: <94h55t$9a1$1@nnrp1.deja.com> <94hml1$o64$1@nnrp1.deja.com> <94hno6$p8s$1@nnrp1.deja.com> <3A76E455.AABF2490@averstar.com> <9570vu$fv0$1@nnrp1.deja.com> NNTP-Posting-Host: localhost X-NNTP-Posting-Host: pogner.demon.co.uk:158.152.70.98 X-Trace: news.demon.co.uk 981005257 nnrp-13:23722 NO-IDENT pogner.demon.co.uk:158.152.70.98 X-Complaints-To: abuse@demon.net NNTP-Posting-Date: 30 Jan 2001 21:30:03 GMT X-Newsreader: Gnus v5.7/Emacs 20.7 Xref: supernews.google.com comp.lang.ada:4797 Date: 2001-01-30T21:30:03+00:00 List-Id: Robert Dewar writes: > In article <3A76E455.AABF2490@averstar.com>, > Tucker Taft wrote: > > I don't agree with Robert on this. Have you tried writing it > > as a loop rather than an aggregate assignment. I suspect > > that all Ada compilers would use separate assignments, > > including GNAT. > > True enough > > > In any case, I believe they should use separate assignments. > > Yes, this article of faith has been discussed in a previous > message but I see nothing in the RM to justify this statement. > > > > Package Machine_Code here we come... > > > > This is not necessarily the right conclusion in my view. > > Most device drivers are written without dropping into machine > > code these days. Ada of all languages should not change > > that. > > If specific instructions are required (as is often the case > with device drivers), then there is nothing in the C, or > Ada (or any other) standard that guarantees that a particular > instruction will be generated. If you are counting on this, > and it just happens that your compiler let's you get away > with it, you are writing implementation dependendent bogus > code, and I think this should be avoided. If it were another compiler provider, I would be tempted to read this whole discussion as "it would cost us a bundle to implement this, so let's dig our heels in". I don't for one moment believe that that's the case here. If the intent is to ensure that the RM be modified (advised) so that Ada will be at least as useful as C for writing device drivers, great! I'm very very far from the expert on memory-mapped device management (I know only one, a VME device), but it seems hard to conceive of devices where you *must* do other than read or write a byte/a short/a word at once??? can't we come up with an interpretation that does at least that? then someone who needs to do (say) bit accesses can be sure they're out on a limb .. -- Simon Wright Work Email: simon.j.wright@amsjv.com Alenia Marconi Systems Voice: +44(0)23-9270-1778 Integrated Systems Division FAX: +44(0)23-9270-1800