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,7767a311e01e1cd X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!news.glorb.com!newscon02.news.prodigy.net!prodigy.net!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: GNAT compiler switches and optimization Date: Mon, 23 Oct 2006 11:02:10 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <1161341264.471057.252750@h48g2000cwc.googlegroups.com> <9Qb_g.111857$aJ.65708@attbi_s21> <434o04-7g7.ln1@newserver.thecreems.com> <4539ce34$1_2@news.bluewin.ch> <453A532F.2070709@obry.net> <9kfq04-sgm.ln1@newserver.thecreems.com> <5vgs04-64f.ln1@newserver.thecreems.com> <453bc74e$0$19614$426a74cc@news.free.fr> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls6.std.com 1161615730 8764 192.74.137.71 (23 Oct 2006 15:02:10 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Mon, 23 Oct 2006 15:02:10 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:U2jfdSiccCDfMNlgJwN0VHvEsS8= Xref: g2news2.google.com comp.lang.ada:7164 Date: 2006-10-23T11:02:10-04:00 List-Id: Warner BRUNS writes: > A problem with Ada is that the memory layout of multidimensional arrays > is not specified in the standard. If you want to have the same memory > layout for all Ada compilers, you have to specify that a multimensional > array should follow the convention of a foreign language, eg. Fortran. > TYPE DefReal IS DIGITS 12; > TYPE DefReal2D IS ARRAY(Integer RANGE <>, > Integer RANGE <>) OF DefReal; > PRAGMA CONVENTION (Fortran, DefReal2D); In practise, you can count on the fact that all Ada compilers will choose row-major order, unless you ask for column-major via the above pragma, even though the RM does not say so. > There is something missing in the Ada standard. Perhaps. - Bob