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-Thread: 103376,7272aa7508a3d83f X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!newsfeed2.dallas1.level3.net!news.level3.com!newsfeed-00.mathworks.com!irazu.switch.ch!switch.ch!news-fra1.dfn.de!newsfeed.hanau.net!newsfeed.vmunix.org!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: pointer questions Date: Sat, 29 Oct 2005 13:25:47 +0100 Organization: Pushface Message-ID: References: <43621147$0$8220$afc38c87@news.optusnet.com.au> NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1130588748 25004 62.49.19.209 (29 Oct 2005 12:25:48 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Sat, 29 Oct 2005 12:25:48 +0000 (UTC) Cancel-Lock: sha1:LhKKObIZgCVs9+6GL42EgIovFJ0= User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin) Xref: g2news1.google.com comp.lang.ada:6046 Date: 2005-10-29T13:25:47+01:00 List-Id: David writes: > I develop larg'ish mission-critical systems in Ada and cannot use > pointers, dynamic memory allocation, tasks, variants, recursion, > etc. etc. You can always find a way to not use pointers as long as > you stick to Ada (not interfacing C/C++). Memory mapped hardware can > be accessed using an expression like "for x'address use at address>". You can declare one variable on top of another the same > way. > > Trying to get code safety-certified with pointers is very difficult > to impossible. Code that doesn't use pointers is invariably simpler > and more reliable but it may require more thought depending upon > mind-set. Do the rules allow unchecked conversion? Using "for x'address use" to "declare one variable on top of another" is a way of trying to pretend to the auditor that you aren't doing unchecked conversion ... much safer to do UC, at least the compiler has a chance to tell you that (for instance) the things concerned aren't the same size!