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,9abafc402a91a18d,start X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!backlog2.nntp.dca.giganews.com!nntp.brightview.co.uk!news.brightview.co.uk.POSTED!not-for-mail NNTP-Posting-Date: Thu, 04 Jun 2009 18:35:34 -0500 Date: Fri, 05 Jun 2009 00:35:30 +0100 From: Tim Rowe User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Newby-ish question -- SPARK v. Ada2005 problem Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-Ebhjj3BNNfp8j80hvfhUEzULFc+KwJpDaGVAr8/8B62wGX5fMuCkmgD05QQ3DWQ6dTGro7Y7IDEje/m!vtwPdXK+FgEkb9GF0HW86FgijBTSiswSg7/jlWKx7KTh1D1+7FKv2tEygMhwnmKyAjwGrIedWoCu!Q1xE7Q7Q4aABKg6PqL0ZH7U0QH8= X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.39 X-Original-Bytes: 1820 Xref: g2news2.google.com comp.lang.ada:6283 Date: 2009-06-05T00:35:30+01:00 List-Id: Looking at the tokeneer source, I find (in spark_io.adb, starting line 123) the function: function File_Ref( File : File_Type) return Ada.Text_IO.File_Type with (amongst others) the return statement: when NamedFile => return File.File.all; Ada.Text_IO.File_Type is a limited type, and gnat informs me that this is illegal in Ada2005 because you can't copy objects of limited type (RM-2005 6.5(5.5/2), so there's a bit more to it). Gnat's recommended solution of using an access type instead is out if I want the code to be SPARK compliant, and (as a confessed neophyte) I can't see a way out of this other than hiding the code from SPARK (or using the -gnat95 compiler flag, of course). Is there something obvious that I'm missing? Thanks in advance!