From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26082 invoked by alias); 17 Apr 2012 14:48:18 -0000 Received: (qmail 25991 invoked by uid 22791); 17 Apr 2012 14:48:17 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=BAYES_00,RCVD_IN_HOSTKARMA_NO X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 17 Apr 2012 14:48:04 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 68A9D1C6A70; Tue, 17 Apr 2012 10:48:03 -0400 (EDT) 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 mYJu4a08UN0l; Tue, 17 Apr 2012 10:48:03 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 2C0911C690C; Tue, 17 Apr 2012 10:48:02 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id AF46E145616; Tue, 17 Apr 2012 07:47:54 -0700 (PDT) Date: Tue, 17 Apr 2012 14:52:00 -0000 From: Joel Brobecker To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [commit] Do not rely on FIELD_LOC_KIND_BITPOS being zero Message-ID: <20120417144754.GK2852@adacore.com> References: <20120417124410.GA15356@host2.jankratochvil.net> <4F8D695E.7070002@redhat.com> <20120417131559.GA25248@host2.jankratochvil.net> <4F8D76B7.90709@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4F8D76B7.90709@redhat.com> User-Agent: Mutt/1.5.20 (2009-06-14) 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: 2012-04/txt/msg00483.txt.bz2 > >> We could make the compiler catch these by making the macro return > >> an rvalue. [...] > 2012-04-17 Pedro Alves > > * gdbtypes.h (FIELD_BITPOS): Rename to ... > (FIELD_BITPOS_LVAL): ... this. > (FIELD_BITPOS): New. > (SET_FIELD_BITPOS): Adjust to use FIELD_BITPOS_LVAL. > * dwarf2read.c (dwarf2_add_field): Use SET_FIELD_BITPOS. > * gdbtypes.c (append_composite_type_field_aligned): Adjust to use > SET_FIELD_BITPOS. > * gnu-v3-abi.c (build_gdb_vtable_type): Adjust to use > SET_FIELD_BITPOS. > * stabsread.c (read_cpp_abbrev, read_one_struct_field) > (read_baseclasses): Adjust to use SET_FIELD_BITPOS. > * target-descriptions.c (tdesc_gdb_type): Adjust to use > SET_FIELD_BITPOS. Thanks for doing that, Pedro - I was going to suggest the same thing. The more the compiler catches errors for us, the better! -- Joel