From: Tim Rowe <spamtrap@tgrowe.plus.net>
Subject: Newby-ish question -- SPARK v. Ada2005 problem
Date: Fri, 05 Jun 2009 00:35:30 +0100
Date: 2009-06-05T00:35:30+01:00 [thread overview]
Message-ID: <jMadnSV-Scvbx7XXnZ2dnUVZ8s2dnZ2d@brightview.co.uk> (raw)
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!
next reply other threads:[~2009-06-04 23:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-04 23:35 Tim Rowe [this message]
2009-06-05 7:36 ` Newby-ish question -- SPARK v. Ada2005 problem roderick.chapman
2009-06-05 13:32 ` Compiler Warnings while building the SPARK Tokeneer anon
2009-06-05 20:37 ` Newby-ish question -- SPARK v. Ada2005 problem Tim Rowe
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox