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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Thread: 103376,11c630572e59f461 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Return-Path: From: "Randy Brukardt" To: Subject: RE: Bug in GNAT GPL 2006? Date: Wed, 21 Feb 2007 14:19:52 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1807 Importance: Normal X-Trash-Finder: Limited filtering for message, local (outbound) source X-Virus-Scanned: amavisd-new at ada-france.org X-BeenThere: comp.lang.ada@ada-france.org X-Mailman-Version: 2.1.9rc1 Precedence: list List-Id: "Gateway to the comp.lang.ada Usenet newsgroup" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.ada Message-ID: X-Leafnode-NNTP-Posting-Host: 88.191.17.134 Organization: Guest of ProXad - France NNTP-Posting-Date: 21 Feb 2007 21:20:03 MET NNTP-Posting-Host: 88.191.14.223 X-Trace: 1172089203 news-2.free.fr 17689 88.191.14.223:52409 X-Complaints-To: abuse@proxad.net Path: g2news2.google.com!news4.google.com!news.glorb.com!gegeweb.org!feed.ac-versailles.fr!exabot.com!proxad.net!cleanfeed2-b.proxad.net!nnrp12-2.free.fr!not-for-mail Xref: g2news2.google.com comp.lang.ada:9380 Date: 2007-02-21T21:20:03+01:00 Bill Findlay writes: > Using GNAT GPL 2006 (20060522-34) I get warning messages > like the following when using extended return statements: > > function is_empty (the_table : a_safe_table) return Boolean is > begin > return result : Boolean do > | > >>> warning: variable "result" is assigned but never read > > lock_table; > result := is_empty(a_basic_table(the_table)); > unlock_table; > end return; > end is_empty; > > I'm inclined to assume that this is a compiler bug, but can > anyone more knowledgeable about Ada 200[57] confirm this? Sure looks like a (harmless) compiler bug to me. It's hard to imagine why you would be required to read the result of a function before returning it. Randy.