comp.lang.ada
 help / color / mirror / Atom feed
* Renaming entries?
@ 1999-02-17  0:00 dennison
  1999-02-17  0:00 ` Nick Roberts
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: dennison @ 1999-02-17  0:00 UTC (permalink / raw)


I don't really understand the error I'm getting, but I'm getting pretty much
the same error message from 2 different compilers.

What I'm trying to do is rename a task entry to be a procedure. The procedure
is declared in the package spec, but the renaming is done in the body. I'm
wondering if that's my problem. Does a renaming have to be a procedure
*declaration*, or can it be the completion of a declaration?

Here's a smallish code sample if you need to see it to answer my question.

procedure Rename_Test is

   procedure Fred;

   task Foo is
      entry Jim;
   end Foo;

   procedure Fred renames Foo.Jim;

   task body Foo is
   begin
      accept Jim;
   end Foo;

begin
   Fred;
end Rename_Test;

When compiled with gnat, I get
rename_test.adb:15:19: not subtype conformant with declaration at line 8
rename_test.adb:15:19: prior declaration for "Fred" has convention "Ada"

The same example compiles OK w/ GreenHills, but not if the declarations are
moved to a package spec and body. In that case I also get an error referring
to Fred having convention "Ada".

Removing the "procedure Fred;" line cause gnat to compile it ok.

T.E.D.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    




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

end of thread, other threads:[~1999-02-23  0:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-02-17  0:00 Renaming entries? dennison
1999-02-17  0:00 ` Nick Roberts
1999-02-17  0:00   ` David Brown
1999-02-18  0:00     ` Nick Roberts
1999-02-18  0:00   ` robert_dewar
1999-02-17  0:00 ` Jean-Pierre Rosen
1999-02-23  0:00 ` Tucker Taft

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