From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27452 invoked by alias); 2 Oct 2009 18:04:57 -0000 Received: (qmail 27373 invoked by uid 22791); 2 Oct 2009 18:04:56 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 02 Oct 2009 18:04:51 +0000 Received: from brahms.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by brahms.sibelius.xs4all.nl (8.14.3/8.14.3) with ESMTP id n92I48jj028106; Fri, 2 Oct 2009 20:04:08 +0200 (CEST) Received: (from kettenis@localhost) by brahms.sibelius.xs4all.nl (8.14.3/8.14.3/Submit) id n92I47I7008266; Fri, 2 Oct 2009 20:04:07 +0200 (CEST) Date: Fri, 02 Oct 2009 18:04:00 -0000 Message-Id: <200910021804.n92I47I7008266@brahms.sibelius.xs4all.nl> From: Mark Kettenis To: tromey@redhat.com CC: ralf.corsepius@rtems.org, brobecker@adacore.com, gdb@sourceware.org, jan.kratochvil@redhat.com In-reply-to: (message from Tom Tromey on Fri, 02 Oct 2009 11:27:12 -0600) Subject: Re: GDB 6.8.92 available for testing References: <20090930204828.GB31446@adacore.com> <4AC41F44.1040502@rtems.org> <20091001170744.GC6532@adacore.com> <4AC4E4F6.5080500@rtems.org> <4AC630C8.5090508@rtems.org> Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-10/txt/msg00050.txt.bz2 > From: Tom Tromey > Date: Fri, 02 Oct 2009 11:27:12 -0600 > > Ralf> I think, len should be size_t, like any "sizeof"'s return type. > > TYPE_LENGTH does not expand to sizeof. > > Ralf> Apart of this, I can't imagine changing this "int" into "size_t" to > Ralf> have any negative impact. > > Yes, I agree. > > I have a slight preference for locals such as this to be declared with > the correct-according-to-gdb type. Seconded. However, the idiom: int len = TYPE_LENGTH(...); memcpy(..., ..., len); is used in several other places in the GDB tree. I really think that we should fix all these cases; not just this one.