From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7697 invoked by alias); 17 Feb 2004 19:12:12 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 7689 invoked from network); 17 Feb 2004 19:12:11 -0000 Received: from unknown (HELO bilbo.inter.net.il) (192.114.186.18) by sources.redhat.com with SMTP; 17 Feb 2004 19:12:11 -0000 Received: from zaretski ([80.230.153.239]) by bilbo.inter.net.il (MOS 3.4.4-GR) with ESMTP id CME57324; Tue, 17 Feb 2004 21:11:27 +0200 (IST) Date: Tue, 17 Feb 2004 19:12:00 -0000 From: "Eli Zaretskii" To: Elena Zannoni Message-Id: <2914-Tue17Feb2004211147+0200-eliz@elta.co.il> CC: drow@false.org, gdb-patches@sources.redhat.com In-reply-to: <16434.9582.574401.561988@localhost.redhat.com> (message from Elena Zannoni on Tue, 17 Feb 2004 09:30:06 -0500) Subject: Re: [ob] Remove initializations of memset'd structure Reply-to: Eli Zaretskii References: <20040216211516.GA17055@nevyn.them.org> <16434.9582.574401.561988@localhost.redhat.com> X-SW-Source: 2004-02/txt/msg00475.txt.bz2 > From: Elena Zannoni > Date: Tue, 17 Feb 2004 09:30:06 -0500 > > > > > > - MSYMBOL_TYPE (m) = mst_unknown; > > > > This part of the patch seems to assume that mst_unknown has the value > > zero. Should we have such assumptions in the code? > > Yes, in symtab.h mst_unknown is 0. I know that, I looked it up in symtab.h. The question is, should the code rely on the fact that zeroing out the struct causes the MSYMBOL_TYPE member to become mst_unknown. Suppose we change the enumeration some day, that would break the code. So I think a comment is not enough, we should leave that line alone. In general, it is my opinion that code should not assume anything about the numerical values of enumerated types.