From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,d679dd7e9c16805a X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news.glorb.com!news2!gegeweb.org!newsfeed0.kamp.net!newsfeed.kamp.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "(see below)" Newsgroups: comp.lang.ada Subject: Re: Selective suppression of warnings --- gnat on GNU/Linux Date: Tue, 30 Dec 2008 11:01:18 +0000 Message-ID: References: <7a6baa71-80e8-4f3a-80b6-34935bda2fc0@r10g2000prf.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Trace: individual.net jaes6/yzouFBS1jovjsLwQtRRHluTz+pGdKsg7Cpg98oxVEmAw Cancel-Lock: sha1:iZKFzOgF1APKQjVEcSLODZWx3GY= User-Agent: Microsoft-Entourage/12.14.0.081024 Thread-Topic: Selective suppression of warnings --- gnat on GNU/Linux Thread-Index: AclqbfDCdq02Jd2dqkK1hiS7qKvYOg== Xref: g2news1.google.com comp.lang.ada:3120 Date: 2008-12-30T11:01:18+00:00 List-Id: On 30/12/2008 03:13, in article 7a6baa71-80e8-4f3a-80b6-34935bda2fc0@r10g2000prf.googlegroups.com, "Michael Mounteney" wrote: > Hello, I am trying to build an application of which some of the source > is automatically translated from Pascal, on the fly. The problem is > that the automatically-translated source is causing a lot of spurious > warnings about declarations not being used. This is because the > Pascal code has many instances of: > > type > somerange = 1..10; > somestruct = record ... end; > > which is translated into Ada as > > type somerange is new integer range 1 .. 10; > > type somestruct is record ... end record; > > but the problem is that any operators such as + and = are not visible > in other units. The solution to that is to rename the operators in > the client units, thus: No, the problem is that the Pascal subrange type declarations have been wrongly translated. The Pascal declaration: type somerange = 1..10; Means, in Ada: SUBtype somerange is Integer range 1..10; Make this change and the Ada type compatibility problems will magically vanish. -- Bill Findlay chez blueyonder.co.uk