From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14326 invoked by alias); 15 Dec 2004 17:33:16 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 2395 invoked from network); 15 Dec 2004 17:20:28 -0000 Received: from unknown (HELO albireo.enyo.de) (212.9.189.169) by sourceware.org with SMTP; 15 Dec 2004 17:20:28 -0000 Received: from [212.9.189.177] (helo=deneb.enyo.de) by albireo.enyo.de with esmtp id 1Cecp7-0006iI-42; Wed, 15 Dec 2004 18:20:25 +0100 Received: from fw by deneb.enyo.de with local (Exim 4.43) id 1Cecp7-0001Bm-Jf; Wed, 15 Dec 2004 18:20:25 +0100 From: Florian Weimer To: Robert Dewar Cc: Dmitry Antipov , gcc@gcc.gnu.org Subject: Re: Dubious "'foo' might be used uninitialized in this function" message References: <41BF1207.2040102@dev.rtsoft.ru> <41BF1C0A.6060100@codesourcery.com> <41C009AA.4020700@dev.rtsoft.ru> <41C0289C.2000209@adacore.com> Date: Wed, 15 Dec 2004 17:33:00 -0000 In-Reply-To: <41C0289C.2000209@adacore.com> (Robert Dewar's message of "Wed, 15 Dec 2004 07:05:48 -0500") Message-ID: <87sm677a1y.fsf@deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2004-12/txt/msg00590.txt.bz2 * Robert Dewar: > Here is an example from Ada: > > 1. generic > 2. type R is private; > | > >>> warning: type "R" is not referenced > > 3. package Q is > 4. X : Integer; > 5. end Q; > > One of our customers recently complained that this was a false > positive, because there might be a child unit of Q that references > R. This is true. However, after quite a bit of dicussion, we > decided that it was useful to retain the warning, since it is > rather unusual (though certainly legal) to have entities that > are referenced ONLY in a child unit, and if we removed the > warning on this basis, we would lose a lot of useful warnings. In this case, pragma Unreferenced could be specified in the body of the parant unit, and it could do the right thing.