From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-65-14.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-0.0 required=3.0 tests=BAYES_20,FREEMAIL_FROM, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Received: by 2002:a37:8785:0:b0:76c:43b5:3563 with SMTP id j127-20020a378785000000b0076c43b53563mr2493qkd.0.1690346990633; Tue, 25 Jul 2023 21:49:50 -0700 (PDT) X-Received: by 2002:a05:6808:1819:b0:3a4:2943:8f7 with SMTP id bh25-20020a056808181900b003a4294308f7mr2679344oib.5.1690346990361; Tue, 25 Jul 2023 21:49:50 -0700 (PDT) Path: eternal-september.org!news.eternal-september.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 25 Jul 2023 21:49:49 -0700 (PDT) Injection-Info: google-groups.googlegroups.com; posting-host=98.59.238.112; posting-account=oHOvdQoAAACYgyEBjgPNvKFOGxg8pNns NNTP-Posting-Host: 98.59.238.112 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <71e087e7-bfb2-4659-b218-134fb265d479n@googlegroups.com> Subject: Rosetta Code task Proper divisors fails to compile From: Kenneth Wolcott Injection-Date: Wed, 26 Jul 2023 04:49:50 +0000 Content-Type: text/plain; charset="UTF-8" X-Received-Bytes: 1763 Xref: news.eternal-september.org comp.lang.ada:65449 List-Id: Hi; Trying to understand (and use) a Rosetta Code task (Proper divisors)... https://rosettacode.org/wiki/Proper_divisors#Ada it fails to compile gnatmake -vh ./proper_divisors.adb GNATMAKE 13.1.0 Copyright (C) 1992-2023, Free Software Foundation, Inc. "proper_divisors.ali" being checked ... -> "proper_divisors.ali" missing. gcc -c -I./ -I- ./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 End of compilation gnatmake: "./proper_divisors.adb" compilation error Why does this work for the the submitter of the Rosetta Code task and not for me? Thanks, Ken Wolcott