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-Thread: 103376,ec31fb6eda682268 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!newsfeeder.wxs.nl!transit.news.xs4all.nl!195.241.76.212.MISMATCH!tiscali!transit1.news.tiscali.nl!dreader2.news.tiscali.nl!not-for-mail Newsgroups: comp.lang.ada Subject: Re: STORAGE_ERROR in adainit References: From: Ludovic Brenta Date: Thu, 12 Aug 2004 21:42:46 +0200 Message-ID: <87vffom9c9.fsf@insalien.org> User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) Cancel-Lock: sha1:AIft3Hp4cA5OlBI34f3rEBWhY3Q= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Organization: Tiscali bv NNTP-Posting-Date: 12 Aug 2004 21:43:02 CEST NNTP-Posting-Host: 83.134.237.215 X-Trace: 1092339782 dreader2.news.tiscali.nl 62400 83.134.237.215:33103 X-Complaints-To: abuse@tiscali.nl Xref: g2news1.google.com comp.lang.ada:2697 Date: 2004-08-12T21:43:02+02:00 List-Id: James Alan Farrell writes: > From: James Alan Farrell Subject: Re: STORAGE_ERROR in adainit > Newsgroups: comp.lang.ada > Date: Thu, 12 Aug 2004 15:28:05 -0400 > > I think I've found the problem: > > There was a function in a C library called program_error. I changed > the name to a_program_error and the storage_error went away. I > suspect that somewhere hidden in the ada library is a variable called > program error. > > Wonder if there are any other names I should avoid using in C > libraries? Since this seems to be the problem, here are the names used by GNAT: (from a-init.c) /* Addresses of exception data blocks for predefined exceptions. */ extern struct Exception_Data constraint_error; extern struct Exception_Data numeric_error; extern struct Exception_Data program_error; extern struct Exception_Data storage_error; extern struct Exception_Data tasking_error; extern struct Exception_Data _abort_signal; (from s-stalib.ads) pragma Export (C, Constraint_Error_Def, "constraint_error"); pragma Export (C, Numeric_Error_Def, "numeric_error"); pragma Export (C, Program_Error_Def, "program_error"); pragma Export (C, Storage_Error_Def, "storage_error"); pragma Export (C, Tasking_Error_Def, "tasking_error"); pragma Export (C, Abort_Signal_Def, "_abort_signal"); BTW, these are not functions but records. Also, you will need to look for places where the C version if program_error was called, and change the name at every call site. HTH > (This was on my cut down program. When I go back to the full program > I suspect there will be other issues to hunt down. But at least I now > have some idea of what I'm looking for and how to find it!) > > Thanks to everyone who sent suggestions! > James -- Ludovic Brenta.