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: a07f3367d7,d0dc7a6023c9ffb1,start X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.180.82.226 with SMTP id l2mr98997wiy.1.1348190011827; Thu, 20 Sep 2012 18:13:31 -0700 (PDT) Path: ed8ni3498083wib.0!nntp.google.com!feeder2.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.84.MISMATCH!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!newsreader4.netcologne.de!news.netcologne.de!newsfeed.straub-nv.de!feeder.erje.net!news2.arglkargh.de!news.glorb.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post02.iad.highwinds-media.com!news.flashnewsgroups.com-b7.4zTQh5tI3A!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: extended return syntax bug in 2012? Date: Tue, 18 Sep 2012 03:43:41 -0400 Message-ID: <85boh3ixn6.fsf@stephe-leake.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (windows-nt) Cancel-Lock: sha1:CP1yEGxPHruj0vBQbz1KuHd7GCs= MIME-Version: 1.0 X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: dbedb5058262de029e66108582 X-Received-Bytes: 1887 Content-Type: text/plain Date: 2012-09-18T03:43:41-04:00 List-Id: I must be missing something. In the Ada 2005 reference manual, the extended return statement syntax (from Annex P http://www.adaic.org/resources/add_content/standards/05rm/html/RM-P.html) is: extended_return_statement ::= return defining_identifier : [aliased] return_subtype_indication [:= expression] [do handled_sequence_of_statements end return]; return_subtype_indication ::= subtype_indication | access_definition That clearly starts with 'return'. However, in Ada 2012 (http://www.ada-auth.org/standards/12rm/html/RM-P.html), it is: extended_return_object_declaration ::= defining_identifier : [aliased][constant] return_subtype_indication [:= expression] extended_return_statement ::= extended_return_object_declaration [do handled_sequence_of_statements end return]; That starts with a defining_identifier (the return object)! The example in 6.5 is the same in both versions: return Node : Cell do -- in a function body, see *note 3.10.1:: for Cell Node.Value := Result; Node.Succ := Next_Node; end return; Am I missing something, or is this a bug in the 2012 ARM? -- -- Stephe