comp.lang.ada
 help / color / mirror / Atom feed
* sizetest.ads:10:28 non-static expression used in number declaration
@ 2004-03-29 11:13 Ole-Hjalmar Kristensen
  2004-03-29 16:31 ` Robert I. Eachus
  0 siblings, 1 reply; 4+ messages in thread
From: Ole-Hjalmar Kristensen @ 2004-03-29 11:13 UTC (permalink / raw)



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.



^ permalink raw reply	[flat|nested] 4+ messages in thread
* sizetest.ads:10:28 non-static expression used in number declaration
@ 2004-03-29 11:16 Ole-Hjalmar Kristensen
  2004-03-29 13:11 ` Frank J. Lhota
  0 siblings, 1 reply; 4+ messages in thread
From: Ole-Hjalmar Kristensen @ 2004-03-29 11:16 UTC (permalink / raw)



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.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-03-29 16:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-29 11:13 sizetest.ads:10:28 non-static expression used in number declaration Ole-Hjalmar Kristensen
2004-03-29 16:31 ` Robert I. Eachus
  -- strict thread matches above, loose matches on Subject: below --
2004-03-29 11:16 Ole-Hjalmar Kristensen
2004-03-29 13:11 ` Frank J. Lhota

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