comp.lang.ada
 help / color / mirror / Atom feed
From: Victor Porton <porton@narod.ru>
Subject: Does variable creation need Elaborate_Body?
Date: Wed, 15 Nov 2017 04:10:54 +0200
Date: 2017-11-15T04:10:54+02:00	[thread overview]
Message-ID: <oug7nc$l68$1@gioia.aioe.org> (raw)

package X is

  -- pragma Elaborate_Body;

  function F return Integer;

  procedure Init;

end X;

package body X is

  V: Integer;

  function F return Integer is
  begin
    return V;
  end;

  procedure Init is
  begin
    V := 123;
  end;

end X;

-------------------

Does the above program need Elaborate_Body pragma for elaboration of "V: 
Integer;"?

Intuitively, "V: Integer;" does nothing. But it is a declaration which needs 
to be elaborated.

Does it elaborate correctly without Elaborate_Body?

-- 
Victor Porton - http://portonvictor.org


             reply	other threads:[~2017-11-15  2:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-15  2:10 Victor Porton [this message]
2017-11-15  2:17 ` Does variable creation need Elaborate_Body? Victor Porton
2017-11-15  9:56 ` AdaMagica
replies disabled

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