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,9c123eeb30b1329e,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-10-07 05:10:35 PST Path: archiver1.google.com!news2.google.com!news1.google.com!newsfeed.stanford.edu!postnews1.google.com!not-for-mail From: frederic.ormancey@atosorigin.com (=?ISO-8859-1?Q?Fr=E9d=E9ric_Ormancey?=) Newsgroups: comp.lang.ada Subject: Pragma Import don't suppress access initialization Date: 7 Oct 2002 05:10:32 -0700 Organization: http://groups.google.com/ Message-ID: <9c9fb8b4.0210070410.fa84429@posting.google.com> NNTP-Posting-Host: 195.68.44.146 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1033992632 9785 127.0.0.1 (7 Oct 2002 12:10:32 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 7 Oct 2002 12:10:32 GMT Xref: archiver1.google.com comp.lang.ada:29557 Date: 2002-10-07T12:10:32+00:00 List-Id: Hi, I was using a 'Address to cast system.address type to an access type, which work fine with GNAT 3.13 but cause an eroneous intialization and erase my access value with NULL when compiled with GNAT 3.14p ( I'am doing a migration from GNAT 3.13 to GNAT 3.14 ). Code look like this : function Analyser_Formule (Varset : in System.ADDRESS) return Integer is V : Ty_Varset; for V use at Varset; pragma Import (Ada, V); where Ty_Varset is declared in another package : type Varset(Nature : Character; Taille : Integer); type Ty_Varset is access Varset; I use the pragma Import to avoid the compiler warning : "implicit initialization of V may modify overlaid storage, use pragma Import for V to suppress initialization (RM B(24))" as describe in the GNAT_RM documentation / Address_Clauses chapter. Unfortunatly the implicit initialization of V erase the Varset parameter of the fonction and force it to 0x0 value, and the pragma Import clause has no effect :-( Does anybody have a solution to avoid this value erasure ? Thanks.