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,29e13b74b6411821 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!d27g2000prf.googlegroups.com!not-for-mail From: gpriv@axonx.com Newsgroups: comp.lang.ada Subject: Re: Ada.Directories.Size wraps on over 2Gb files Date: Mon, 10 Dec 2007 17:36:03 -0800 (PST) Organization: http://groups.google.com Message-ID: <60c78bed-4e50-463b-8fe6-4b3c68c40a6d@d27g2000prf.googlegroups.com> References: <0db40dde-17f0-40a9-9dc0-55f9b0a8e1b1@x69g2000hsx.googlegroups.com> NNTP-Posting-Host: 151.196.71.114 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1197336964 29800 127.0.0.1 (11 Dec 2007 01:36:04 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 11 Dec 2007 01:36:04 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: d27g2000prf.googlegroups.com; posting-host=151.196.71.114; posting-account=YaY8rAoAAAAAnFXOECY3BGVJsrvFJCgy User-Agent: G2/1.0 X-HTTP-Via: 1.1 SPARKS X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:18883 Date: 2007-12-10T17:36:03-08:00 List-Id: On Dec 10, 8:29 pm, "Randy Brukardt" wrote: > wrote in message > > news:0db40dde-17f0-40a9-9dc0-55f9b0a8e1b1@x69g2000hsx.googlegroups.com... > > > Ada.Directories.Size wraps on over 2Gb files returning negative > > number. I saw that was mentioned in > > Sounds like a compiler bug. Ada.Directories.Size is supposed to return the > correct answer or Constraint_Error. Constraint_Error only if the type > File_Size can't hold the value (for instance, if it is 32-bits on a compiler > that only supports 32-bit integers). You didn't say what compiler that you > are using, but you should contact your vendor. > > BTW, it isn't possible for Ada.Directories.Size to return a negative number > unless something is *really* screwed up, because type > Ada.Directories.File_Size does not include negative numbers. They'd have to > have suppressed range checking of the result... > > Randy. I am using: GPS 4.1.3 (20070913) hosted on pentium-mingw32msv GNAT GPL 2007 (20070405-41) with following: type File_Size is range 0 .. Long_Long_Integer'Last; -- The type File_Size represents the size of an external file Range checks might been suppressed in the library.