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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,461d464a39a7a30a X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,UTF8 X-Received: by 10.180.13.233 with SMTP id k9mr7031497wic.1.1367665818283; Sat, 04 May 2013 04:10:18 -0700 (PDT) Path: p18ni66813wiv.0!nntp.google.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!85.12.40.130.MISMATCH!xlned.com!feeder1.xlned.com!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newsfeed.news.ucla.edu!nrc-news.nrc.ca!News.Dal.Ca!news.litech.org!news.etla.org!aioe.org!.POSTED!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: Erroneous code generation from GNAT or GCC? Date: Tue, 30 Apr 2013 02:48:56 +0200 Organization: Ada @ Home Message-ID: References: NNTP-Posting-Host: ZXqOjp+NNxswgqXUj66j5g.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/12.15 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable Date: 2013-04-30T02:48:56+02:00 List-Id: Le Mon, 29 Apr 2013 03:35:53 +0200, Yannick Duch=C3=AAne (Hibou57) = a =C3=A9crit: > If all parameters must be volatile when there address attribute is use= d, = > that implies systematic copy of everything, as types defined for Ada = > programs, are not to be volatile Finally, this may be seen as a kind of representation conversion, where= = copying to buffers before sending to the outside world is also required.= Beside this, I noted something from the RM: http://www.adaic.org/resources/add_content/standards/05aarm/html/AA-13-8= .html > If a subprogram_body contains any code_statements, then > within this subprogram_body the only allowed form of statement > is a code_statement (labeled or not), the only allowed declarative_ite= ms > are use_clauses, and no exception_handler is allowed (comments and = > pragmas > are allowed as usual). This seems to mean object declarations are not allowed in this context. = = But I did use object declarations in this context and GNAT did not = complained. Which is right and which is wrong? -- = =E2=80=9CSyntactic sugar causes cancer of the semi-colons.=E2=80=9D [1] =E2=80=9CStructured Programming supports the law of the excluded muddle.= =E2=80=9D [1] [1]: Epigrams on Programming =E2=80=94 Alan J. =E2=80=94 P. Yale Univers= ity