From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3849a7e484f56749 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-07-09 19:00:13 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!wn1feed!wn3feed!worldnet.att.net!204.127.198.204!attbi_feed4!attbi.com!sccrnsc03.POSTED!not-for-mail From: "SteveD" Newsgroups: comp.lang.ada References: <3D2ADF27.8070502@wanadoo.fr> Subject: Re: generic packages X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: NNTP-Posting-Host: 12.225.227.101 X-Complaints-To: abuse@attbi.com X-Trace: sccrnsc03 1026266412 12.225.227.101 (Wed, 10 Jul 2002 02:00:12 GMT) NNTP-Posting-Date: Wed, 10 Jul 2002 02:00:12 GMT Organization: AT&T Broadband Date: Wed, 10 Jul 2002 02:00:12 GMT Xref: archiver1.google.com comp.lang.ada:26981 Date: 2002-07-10T02:00:12+00:00 List-Id: "Sami Evangelista" wrote in message news:3D2ADF27.8070502@wanadoo.fr... [snip] > now i want to declare a generic function which take a A set and return a > B set according to a function wich take a A element and return B > element. I have tried this in the generic_set.ads file, but gnat crashes The following code compiles with no crashes using gnat-3.14p-nt.exe on Windows 2000. ======================================================= procedure test is generic type Element is private; with function "=" (E1, E2 : in Element) return boolean; package Generic_Set is type Set_Record is private; type Set is private; -- ..... private type Set is access Set_record; type Set_record is record El : Element; Others_Els : Set; end record; end Generic_Set; generic with package a_set is new generic_set(<>); with package b_set is new generic_set(<>); with function a_to_b(A : in a_set.element) return b_set.element; function a_set_to_b_set(the_set : in a_set.set) return b_set.set; function a_set_to_b_set(the_set : in a_set.set) return b_set.set is dummy : b_set.Set; begin return dummy; end a_set_to_b_set; begin null; end test; ============================================== It's not very useful as it is, I just wanted to reproduce your crash. SteveD