From: Stephen Leake <stephen_leake@stephe-leake.org>
Subject: Re: Missing Index Value in Array Aggregate
Date: Sun, 30 Sep 2007 07:02:33 -0400
Date: 2007-09-30T07:02:33-04:00 [thread overview]
Message-ID: <uve9sju0m.fsf@stephe-leake.org> (raw)
In-Reply-To: 1i570wf.w0nwjpq56dc2N%csampson@inetworld.net
csampson@inetworld.net (Charles H. Sampson) writes:
> Stephen Leake <stephen_leake@stephe-leake.org> 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
prev parent reply other threads:[~2007-09-30 11:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-26 13:21 Missing Index Value in Array Aggregate Charles H. Sampson
2007-09-26 15:54 ` Adam Beneschan
2007-09-26 23:33 ` Randy Brukardt
2007-09-28 3:21 ` Charles H. Sampson
2007-09-28 10:05 ` Stephen Leake
2007-09-28 10:26 ` Ludovic Brenta
2007-09-28 16:21 ` Pascal Obry
2007-09-28 20:26 ` Maciej Sobczak
2007-10-03 17:01 ` roderick.chapman
2007-09-29 15:31 ` Charles H. Sampson
2007-09-30 11:02 ` Stephen Leake [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox