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!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!cyclone1.gnilink.net!gnilink.net!nx01.iad.newshosting.com!newshosting.com!newspeer.monmouth.com!newsswitch.lcs.mit.edu!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Selective suppression of warnings --- gnat on GNU/Linux Date: Tue, 30 Dec 2008 18:26:33 -0500 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <7a6baa71-80e8-4f3a-80b6-34935bda2fc0@r10g2000prf.googlegroups.com> <57b8ccae-e5b8-448e-a6d1-86145fc4d03c@s1g2000prg.googlegroups.com> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls4.std.com 1230679593 16605 192.74.137.71 (30 Dec 2008 23:26:33 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Tue, 30 Dec 2008 23:26:33 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:pw51/ytzls27wWAc0FZkuB8AR6k= Xref: g2news1.google.com comp.lang.ada:3145 Date: 2008-12-30T18:26:33-05:00 List-Id: Michael Mounteney writes: > Thanks very much, Ludovic, that answer was just what I needed ! The > warning count has decreased by about 80%. > > Bill: I take your point but I am trying to preserve semantic > information the conversion. So I do want the types to be distinct. > The Pascal source has been modified where necessary thus: > > dest := (*ada:typeofdest*)(expr); > > which the convertor sees as > > dest := typeofdest(expr); > > in order to maintain the distinction of types. Aha! So you're not exactly translating Pascal to Ada, you're translating Pascal with some interesting annotations (in Pascal comments) to Ada. I think you might be better off annotating the Pascal type declarations (which ones should be separate types, in the Ada sense, versus subtypes), rather than annotating the individual Pascal expressions with conversion annotations. - Bob