comp.lang.ada
 help / color / mirror / Atom feed
From: dennison@telepath.com
Subject: Renaming entries?
Date: 1999/02/17
Date: 1999-02-17T00:00:00+00:00	[thread overview]
Message-ID: <7aelgt$2hr$1@nnrp1.dejanews.com> (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    




             reply	other threads:[~1999-02-17  0:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-02-17  0:00 dennison [this message]
1999-02-17  0:00 ` Renaming entries? 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
replies disabled

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