comp.lang.ada
 help / color / mirror / Atom feed
From: Shark8 <onewingedshark@gmail.com>
Subject: Re: (GNADE) Access attribute not allowed in generic body
Date: Thu, 15 Aug 2013 06:42:12 -0700 (PDT)
Date: 2013-08-15T06:42:12-07:00	[thread overview]
Message-ID: <2bb56177-ff86-4d54-bceb-ed57a5a90411@googlegroups.com> (raw)
In-Reply-To: <86395c3d-e0e2-41f1-8286-08a64125fd2e@googlegroups.com>

On Thursday, August 15, 2013 1:27:58 AM UTC-6, Dwiki wrote:
> hello again,
> 
> im trying to compile app using gnade (1.5.3a) in windows, but it show error message 
> 
> 
> 
> gnu-db-sqlcli-dispatch-a_string.adb:62:40: 'Access attribute not allowed in gene
> 
> ric body
> 
> gnu-db-sqlcli-dispatch-a_string.adb:62:40: because access type "Attr_Get_Func" i
> 
> s declared outside generic unit (RM 3.10.2(32))
> 
> gnu-db-sqlcli-dispatch-a_string.adb:62:40: move 'Access to private part, or (Ada
> 
>  2005) use anonymous access type instead of "Attr_Get_Func"
> 
> gnu-db-sqlcli-dispatch-a_string.adb:63:40: 'Access attribute not allowed in gene
> 
> ric body
> 
> gnu-db-sqlcli-dispatch-a_string.adb:63:40: because access type "Attr_Set_Proc" i
> 
> s declared outside generic unit (RM 3.10.2(32))
> 
> gnu-db-sqlcli-dispatch-a_string.adb:63:40: move 'Access to private part, or (Ada
> 
>  2005) use anonymous access type instead of "Attr_Set_Proc"
> 
> completed 1 out of 1 (100%)...
> 
> gprbuild: *** compilation phase failed
> 
> 
> 
> any clue?
> 
> 
> 
> thank you....

If it's a Ada 2005/2012 incompatibility as Dmitry suggests you can try throwing "pragma Ada_2005;" as the first-line in the body. And, if you're using GNAT, you can use different Ada versions for the spec and body... which means you can add the pre/post condition aspects [and an Ada_2012 pragma] to the spec and keep your working Ada 2005 (or 95, or possibly 83*) and add the appropriate pragma.

* Ada 83 doesn't allow child-packages to be with/used, this can be alleviated by creating a library-level rename and using that.


  parent reply	other threads:[~2013-08-15 13:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-15  7:27 (GNADE) Access attribute not allowed in generic body Dwiki
2013-08-15  7:37 ` Dwiki
2013-08-15  7:53 ` Dmitry A. Kazakov
2013-08-15  8:17   ` Dwiki
2013-08-16 16:46     ` Stephen Leake
2013-08-18 13:40       ` Dwiki
2013-08-15  8:37   ` egilhh
2013-08-16 16:44   ` Stephen Leake
2013-08-15 13:42 ` Shark8 [this message]
2013-08-15 15:10   ` Adam Beneschan
replies disabled

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