From: "Jeffrey R.Carter" <spam.jrcarter.not@spam.acm.org.not>
Subject: Re: Rosetta Code task Proper divisors fails to compile
Date: Wed, 26 Jul 2023 10:36:12 +0200 [thread overview]
Message-ID: <u9qlts$1elnt$1@dont-email.me> (raw)
In-Reply-To: <71e087e7-bfb2-4659-b218-134fb265d479n@googlegroups.com>
On 2023-07-26 06:49, Kenneth Wolcott wrote:
>
> https://rosettacode.org/wiki/Proper_divisors#Ada
>
> gnatmake -vh ./proper_divisors.adb
>
> generic_divisors.ads:11:08: error: (Ada 2005) cannot copy object of a limited type (RM-2005 6.5(5.5/2))
> generic_divisors.ads:11:08: error: return by reference not permitted in Ada 2005
>
> Why does this work for the the submitter of the Rosetta Code task and not for me?
For some reason your gnatmake seems to be defaulting to -gnat05 mode. This code
has an expression function, which is Ada 12, so try adding -gnat12 to the command.
You also should not need to put "./" in front of the file name, though I don't
see how that would make a difference.
--
Jeff Carter
"I'm a lumberjack and I'm OK."
Monty Python's Flying Circus
54
next prev parent reply other threads:[~2023-07-26 8:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-26 4:49 Rosetta Code task Proper divisors fails to compile Kenneth Wolcott
2023-07-26 8:36 ` Jeffrey R.Carter [this message]
2023-07-26 18:30 ` Kenneth Wolcott
2023-07-26 19:57 ` Jeffrey R.Carter
2023-07-26 22:26 ` Kenneth Wolcott
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox