From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15865 invoked by alias); 5 Jan 2008 15:05:44 -0000 Received: (qmail 15856 invoked by uid 22791); 5 Jan 2008 15:05:41 -0000 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 05 Jan 2008 15:05:24 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id BD21F2A9634; Sat, 5 Jan 2008 10:05:22 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id CoyPnCiEDCbX; Sat, 5 Jan 2008 10:05:22 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 42CD22A960B; Sat, 5 Jan 2008 10:05:22 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id E4C21E7ACB; Sat, 5 Jan 2008 07:05:14 -0800 (PST) Date: Sat, 05 Jan 2008 15:05:00 -0000 From: Joel Brobecker To: Eli Zaretskii Cc: gdb-patches@sourceware.org Subject: Re: [RFA/DWARF] Set TYPE_FLAG_STUB for enum DIEs that are declarations only Message-ID: <20080105150514.GF5975@adacore.com> References: <20080103153952.GC582@adacore.com> <20080103154055.GD582@adacore.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.2i Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-01/txt/msg00081.txt.bz2 > > + if (die_is_declaration (die, cu)) > > + TYPE_FLAGS (type) |= TYPE_FLAG_STUB; > > + > > I'd suggest a comment here to explain why we do this. I am the kind that usually writes a lot of comments, but I think it would be surperfluous in this case: TYPE_FLAG_STUB and a non-zero DW_AT_declaration attribute are two ways of saying the same thing. Are you sure you want a comment? /* If the type is a declaration, then the definition is not complete. Mark the type as a stub. */ This comment is just repeating the code. -- Joel