comp.lang.ada
 help / color / mirror / Atom feed
From: "Björn Persson" <bjorn@xn--rombobjrn-67a.se>
Subject: Re: New Version of the PragmAda Reusable Components Available
Date: Sun, 17 Mar 2013 11:32:38 +0100
Date: 2013-03-17T11:32:38+01:00	[thread overview]
Message-ID: <20130317113238.1f6819eb@hactar.xn--rombobjrn-67a.se> (raw)
In-Reply-To: ki35ev$q56$2@dont-email.me

Jeffrey Carter wrote:
> On 03/16/2013 04:54 PM, Björn Persson wrote:
>  > · GCC 4.7 and 4.8 emit four instances of this warning:
>  >
>  > pragmarc-list_bounded.ads:23:04: warning: in instantiation at 
> pragmarc-list_bounded_unprotected.adb:279
>  > pragmarc-list_bounded.ads:23:04: warning: cannot return a local value by 
> reference
>  > pragmarc-list_bounded.ads:23:04: warning: "Program_Error" will be raised at 
> run time
>  >
>  > I haven't examined it further but I figured you might want to look into
>  > it.
> 
> The PragmARCs are Ada 95, and return limited values. Compiling them with a 
> compiler for a more recent version of the language is expected not to work.

If I try to compile without any special switches I get the hard error
"(Ada 2005) cannot copy object of a limited type (RM-2005 6.5(5.5/2))"
in seven different places. The warning above is when I use -gnat95,
which is supposed to make GNAT compile Ada 95, and it happens only at
pragmarc-list_bounded_unprotected.adb:279, though in four
instantiations.

I'm not saying it's not a compiler bug though.

Björn Persson




  reply	other threads:[~2013-03-17 10:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-11 19:48 New Version of the PragmAda Reusable Components Available PragmAda Software Engineering
2013-03-16 23:54 ` Björn Persson
2013-03-17  1:16   ` Jeffrey Carter
2013-03-17 10:32     ` Björn Persson [this message]
2013-03-17 17:51       ` Jeffrey Carter
replies disabled

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