comp.lang.ada
 help / color / mirror / Atom feed
* Problem Compiling with GNAT
@ 1999-03-15  0:00 Larry
  1999-03-15  0:00 ` Matthew Heaney
  1999-03-16  0:00 ` Larry
  0 siblings, 2 replies; 10+ messages in thread
From: Larry @ 1999-03-15  0:00 UTC (permalink / raw)


First question:  How do you post to GNAT Chat?	I went to the ACT site, then
to GNAT Chat, and could see all the messages, but didn't see how to post.  I
think this post might be more appropriate there.

I have GNAT 3.11P on Windows NT 4.0 and am trying to compile a large amount
of Ada 83 code developed using Rational Apex.  We hope to port/re-develop the
code using GNAT.  This may not be enough information for anyone to diagnose
the problem but there is too much code to post it all and I just got it and
don't know it very well.

There is a type named Class in many packages and in one procedure the compiler
seems to be confused about which Class is used.  Here is abbreviated code for
that procedure:

procedure Display (Next_Timed_Fire_Mission     : in Fire_Missions.Class;
                   Next_Non_Timed_Fire_Mission : in Fire_Missions.Class) is

-- Fire_Missions.Class is a private record type.

   use Fire_Missions.Operators;
   Not_Used : Boolean;
begin

   if Next_Timed_Fire_Mission_Gui.Item_Of
      /= Next_Timed_Fire_Mission then
--    ^ Error messages point to this line
      Next_Timed_Fire_Mission_Gui.Set (Next_Timed_Fire_Mission);

      if Next_Timed_Fire_Mission = Fire_Missions.Null_Value then

            Display_This_Gui (This_Gui =>
                              Next_Timed_Fire_Mission_Gui.Clear_Display,
                              Continue => Not_Used);
      else
            Display_Next_Timed_Fire_Mission_Gui;
      end if;

   end if;
end Display;

This version gives the error messages:

  expected type "Location_Data.Class" defined at location_data.ads:100
  found type "Firing_Points.Class" defined at firing_points.ads:57

If I comment out the use Fire_Missions.Operators; statement, I get:

  operator for private type "Class" defined at fire_missions.ads:166
    is not directly visible
  use clause would make operation legal

I have also tried: not Fire_Missions."=" (...) without the use clause and I
get the first set of error messages.  I'm stumped.  Can anyone explain what
is happening?

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




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

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

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-03-15  0:00 Problem Compiling with GNAT Larry
1999-03-15  0:00 ` Matthew Heaney
1999-03-15  0:00   ` Larry
1999-03-16  0:00     ` fraser
1999-03-16  0:00       ` Jean-Pierre Rosen
1999-03-16  0:00         ` Matthew Heaney
1999-03-19  0:00         ` Fraser Wilson
1999-03-16  0:00       ` Matthew Heaney
1999-03-16  0:00       ` Brian Rogoff
1999-03-16  0:00 ` Larry

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