comp.lang.ada
 help / color / mirror / Atom feed
From: Niklas Holsti <niklas.holsti@tidorum.invalid>
Subject: Re: pragmas in doubly linked lists
Date: Fri, 27 Jan 2023 18:16:18 +0200	[thread overview]
Message-ID: <k3ibmiFodb6U1@mid.individual.net> (raw)
In-Reply-To: <823bfde7-adb3-4cd2-adca-744cf676864an@googlegroups.com>


On 2023-01-26 20:25, L. B. wrote:
> Hello,
> 
> I'm having issues with cursors of doubly linked lists (erroneous
> memory access exceptions).


Sounds like a rather common programming error, perhaps trying to 
dereference pointers that are null.


> So I'm wondering whether the pragmas might solve the problems.


That is very unlikely, IMO.


> What is the purpose of the pragmas defined in the package like
> 
> pragma Preelaborate(Doubly_Linked_Lists);
> pragma Preelaborable_Initialization(List);
> pragma Preelaborable_Initialization(Cursor);


They tell the Ada compiler that the named package and the named types 
will and should have very simple initialization requirements (default 
initialization, for the types). They have no (visible) effect on how the 
program executes and, AIUI, cannot be related to your memory access 
exceptions.

For more explanation, see the Ada RM, 
http://www.ada-auth.org/standards/22rm/html/RM-10-2-1.html.

If you would like help on the memory access exceptions, do describe the 
problem more in detail here, and perhaps someone can help.

  reply	other threads:[~2023-01-27 16:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-26 18:25 pragmas in doubly linked lists L. B.
2023-01-27 16:16 ` Niklas Holsti [this message]
2023-02-11  8:13   ` Mario Blunk
2023-02-13  7:22     ` Emmanuel Briot
2023-02-13  7:40       ` Mario Blunk
2023-02-13  7:43         ` Emmanuel Briot
2023-03-29 16:46           ` Mario Blunk
2023-04-19  7:17             ` Mario Blunk
replies disabled

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