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-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-2.9 required=3.0 tests=BAYES_00,NICE_REPLY_A autolearn=ham autolearn_force=no version=3.4.6 Path: eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: Gnat bug or mistaken program? Date: Wed, 28 Jul 2021 07:21:38 +0200 Organization: Adalog Message-ID: References: <318e5e93-5f66-4bb8-8bf0-7ee3fd2688fan@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Wed, 28 Jul 2021 05:21:37 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="9009b58b8ac011fe24fa131bd1d641eb"; logging-data="29296"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+yOHvGtkvG1U8JrLUQD4iW" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 Cancel-Lock: sha1:X7tWzRV4cyMwKDx5GS3e5RoQ2rU= In-Reply-To: Content-Language: fr Xref: reader02.eternal-september.org comp.lang.ada:62426 List-Id: Le 27/07/2021 à 18:00, Niklas Holsti a écrit : >> * Rename the operation: >>    function "**" (Left : Float; Right : Float) return Float renames >>       Ada.Numerics.Elementary_Functions."**"; >>    This makes the specific operation visible > > > Before Ada got "use type", such renaming declarations were the only > alternative to "use package", but they are verbose and proved (in my > experience, and that of others too) to be very error-prone, mainly when > renaming many operators -- copy-paste errors were rampant and hard to > find by reading. Interesting effects occur when "-" is renamed as "+" or > vice versa. I consider this solution to be the last (worst) choice. With AdaControl, you can check that operators that are renamed as a different operator: check renaming_declarations (not identical operator as_operator function); (This syntax is from the soon-to-be-released new version of AdaControl - wavefront available from GitHub: github.adalog.fr) -- J-P. Rosen Adalog 2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX Tel: +33 1 45 29 21 52 https://www.adalog.fr