sizetest.ads:10:28 non-static expression used in number declaration

From: Ole-Hjalmar Kristensen (ole-hjalmar.kristensen_at_substitute_employer_here.com)
Date: 03/29/04


Date: 29 Mar 2004 13:13:18 +0200


Gnat 3.15p throws out the following error message when confronted with this program:
sizetest.ads:10:28: non-static expression used in number declaration

Kind of weird. If I change constant to constant Integer it compiles without errors.
Any reasonable explanation or compiler bug?
Same error message if I use Foo'size instead.

package Sizetest is

   type Foo is record
      X : Integer;
      Y : Integer;
   end record;

   F : Foo;

   Foo_Size : constant := F'Size;

end Sizetest;

-- 
   C++: The power, elegance and simplicity of a hand grenade.


Relevant Pages