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,23f57930ddc13e1c X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!out02a.usenetserver.com!news.usenetserver.com!in01.usenetserver.com!news.usenetserver.com!in03.usenetserver.com!news.usenetserver.com!pc03.usenetserver.com!news.flashnewsgroups.com-b7.4zTQh5tI3A!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Missing Index Value in Array Aggregate References: <1i50iqb.14r2zb11w8eyc2N%csampson@inetworld.net> <1190822071.488118.316450@y42g2000hsy.googlegroups.com> <1i548co.yz2f6m45x0mwN%csampson@inetworld.net> <1i570wf.w0nwjpq56dc2N%csampson@inetworld.net> From: Stephen Leake Date: Sun, 30 Sep 2007 07:02:33 -0400 Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/22.1 (windows-nt) Cancel-Lock: sha1:b6VjTnfaGMzMIMx1f2Zy4ezNcyo= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: 5e1ff46ff8248e05e48ed22168 Xref: g2news2.google.com comp.lang.ada:2236 Date: 2007-09-30T07:02:33-04:00 List-Id: csampson@inetworld.net (Charles H. Sampson) writes: > Stephen Leake wrote: > >> With GNAT, I have a policy to eliminate _all_ warnings by fixing the >> source code. Same with Gnu C, when I'm forced to use that. > > A good practice in general and I've been thinking > about it for our project. Unfortunately, many of the > warnings are of things that might happen but won't, so it > would mean cluttering the code with something unnecessary, > usually with a small execution penalty, along with > comments about why such a strange thing is being done. You should ask the compiler vendor to fix this, so it is easier to eliminate the warnings in a reasonable way. They will never fix it if they don't hear complaints. Make them earn their support fee! Point out that they may lose a customer to AdaCore if they don't! > The most irritating involves an array of 6-bit components, needed to > interface external hardware, which generates a warning that the code > is "less efficient" because of the component size. Less efficient > than what, I've asked. Code that doesn't work? Perfect example of a warning that should be suppressed. > I don't think we have an ability to selectively suppress > warnings, although it might have been put in unnoticed by > me in one of the many upgrades in the 10+ years we've been > using this compiler. You can use 'pragma Suppress' / 'pragma Unsuppress' around the offending code; that should be sufficient. See LRM 11.5. Also ask the vendor if they have another way. -- -- Stephe