From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6368 invoked by alias); 21 Dec 2009 17:18:42 -0000 Received: (qmail 6350 invoked by uid 22791); 21 Dec 2009 17:18:41 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 21 Dec 2009 17:18:37 +0000 Received: (qmail 10929 invoked from network); 21 Dec 2009 17:18:35 -0000 Received: from unknown (HELO wind.localnet) (vladimir@127.0.0.2) by mail.codesourcery.com with ESMTPA; 21 Dec 2009 17:18:35 -0000 From: Vladimir Prus To: Daniel Jacobowitz Subject: Re: RFA: unbreak typedefed bitfield Date: Mon, 21 Dec 2009 17:18:00 -0000 User-Agent: KMail/1.12.2 (Linux/2.6.31-14-generic-pae; KDE/4.3.2; i686; ; ) Cc: Tom Tromey , gdb-patches@sources.redhat.com References: <200912181541.30891.vladimir@codesourcery.com> <20091221171500.GA16198@caradoc.them.org> In-Reply-To: <20091221171500.GA16198@caradoc.them.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <200912212018.33780.vladimir@codesourcery.com> 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: 2009-12/txt/msg00310.txt.bz2 On Monday 21 December 2009 20:15:00 Daniel Jacobowitz wrote: > On Mon, Dec 21, 2009 at 10:08:38AM -0700, Tom Tromey wrote: > > You could try: > > > > #define TYPE_LENGTH(thistype) check_typedef (thistype)->length > > > > While this is probably insufficient to fix the check_typedef problem in > > general, it may help with the most common source of problems. > > TYPE_LENGTH (type) = DW_UNSND (attr); > > That's likely to cause some trouble. IMO, this usage should just go, in preference to type_set_length (type, DW_UNSND (attr)); In fact, I think TYPE_LENGTH itself should go -- there's no reason to use a macro with all the nasty behaviours like above when inline functions would work just fine. - Volodya