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!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.nethere.com!news.nethere.com.POSTED!not-for-mail NNTP-Posting-Date: Sat, 29 Sep 2007 10:31:38 -0500 Newsgroups: comp.lang.ada Subject: Re: Missing Index Value in Array Aggregate From: csampson@inetworld.net (Charles H. Sampson) Date: Sat, 29 Sep 2007 08:31:40 -0700 Message-ID: <1i570wf.w0nwjpq56dc2N%csampson@inetworld.net> References: <1i50iqb.14r2zb11w8eyc2N%csampson@inetworld.net> <1190822071.488118.316450@y42g2000hsy.googlegroups.com> <1i548co.yz2f6m45x0mwN%csampson@inetworld.net> User-Agent: MacSOUP/2.4.6 X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 75.42.162.103 X-Trace: sv3-RDrW0nPZdRX91xQlJnVi/nEtvZxns1CIWz45XCiK1AiaBd4rvGo5ir9gM7qd/+lkSRryAzEElgtCUI4!o49Qeg/yAUyNV3OffUAGbw3QmABMLK2wl0B5WBGrpKCWCAXphVo9UE1hAxfhot8LCSVWwjIJrKPq!Cv5ZoNvaavK7EKxnf7xPLRjsLozQ X-Complaints-To: abuse@nethere.com X-DMCA-Complaints-To: abuse@nethere.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.35 Xref: g2news2.google.com comp.lang.ada:2220 Date: 2007-09-29T08:31:40-07:00 List-Id: Stephen Leake wrote: > csampson@inetworld.net (Charles H. Sampson) writes: > > > I should have given more detail of the context. > > Although it's not relevant now, here it is: The aggregate > > was the initial value of a constant array object, the type > > of that object being an anonymous array type whose index > > is a constrained enumeration type. My compiler did give > > me the (proper) warning of a constraint error at run time. > > Unfortunately, the warning was overlooked because the > > compiler tends to put out a bunch of warnings of much > > less value. > > What compiler? > I don't want to name names because I think it's a decent compiler and I wouldn't want to scare off any poten- tial user because of this minor issue. > 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. > > Doing so fixes bugs. > > Sometimes I have to resort to a compiler switch to suppress a > warning, but very rarely. 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. (Although I'm working on a real-time system, the execution penalty is not an issue because we have more CPU power than we know what to do with.) Other warnings are things we know about but can't change. 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? 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. Charlie -- For an email response, insert "0824" between the 'c' and 's'.