comp.lang.ada
 help / color / mirror / Atom feed
From: gpriv@axonx.com
Subject: Re: Ada.Directories.Size wraps on over 2Gb files
Date: Mon, 10 Dec 2007 17:36:03 -0800 (PST)
Date: 2007-12-10T17:36:03-08:00	[thread overview]
Message-ID: <60c78bed-4e50-463b-8fe6-4b3c68c40a6d@d27g2000prf.googlegroups.com> (raw)
In-Reply-To: fjkou8$gt4$1@jacob-sparre.dk

On Dec 10, 8:29 pm, "Randy Brukardt" <ra...@rrsoftware.com> wrote:
> <gp...@axonx.com> 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.



  reply	other threads:[~2007-12-11  1:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-10 21:38 Ada.Directories.Size wraps on over 2Gb files gpriv
2007-12-10 22:28 ` Stefan Bellon
2007-12-11  1:29 ` Randy Brukardt
2007-12-11  1:36   ` gpriv [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-12-10 21:37 gpriv
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox