------- Comment #30 from rguenth at gcc dot gnu dot org  2007-02-23 17:32 
-------
Ok, I have too little Ada skills ;)  What is missing in the following?


with test;

package test is
  type Count is range 0 .. Natural'Last;
  subtype Positive_Count is Count range 1 .. Count'Last;
  procedure Set_Col (To : Positive_Count);
end test;

procedure Set_Col
  (To  : Positive_Count)
is
begin
  if not To'Valid then
    raise Constraint_Error;
  end if;
end Set_Col;


$ gnatchop -w Set_Col.adb
splitting Set_Col.adb into:
   test.ads
   set_col.adb
$ gnatmake set_col.adb
gcc-4.1 -c set_col.adb
set_col.ads:2:25: "Positive_Count" is undefined (more references follow)
gnatmake: "set_col.adb" compilation error


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30911

Reply via email to