From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28248 invoked by alias); 7 May 2009 18:53:12 -0000 Received: (qmail 28239 invoked by uid 22791); 7 May 2009 18:53:11 -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) (82.92.89.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 07 May 2009 18:53:03 +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 n47IqbHc020681; Thu, 7 May 2009 20:52:37 +0200 (CEST) Received: (from kettenis@localhost) by brahms.sibelius.xs4all.nl (8.14.3/8.14.3/Submit) id n47IqbtU010728; Thu, 7 May 2009 20:52:37 +0200 (CEST) Date: Thu, 07 May 2009 18:53:00 -0000 Message-Id: <200905071852.n47IqbtU010728@brahms.sibelius.xs4all.nl> From: Mark Kettenis To: brobecker@adacore.com CC: gdb-patches@sourceware.org In-reply-to: <20090507183753.GE659@adacore.com> (message from Joel Brobecker on Thu, 7 May 2009 11:37:53 -0700) Subject: Re: [RFA] Fix typo in type of parameter "w" in print_wchar... References: <20090425003658.GA32745@adacore.com> <200904250849.n3P8n5BU002469@brahms.sibelius.xs4all.nl> <20090507183753.GE659@adacore.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-05/txt/msg00161.txt.bz2 > Date: Thu, 7 May 2009 11:37:53 -0700 > From: Joel Brobecker > > > I think this is wrong. The type of a single wide character is wint_t > > instead of wchar_t such that it can properly hold WEOF, much in the > > same way as the "normal" character functions use int instead of char. > > Thanks for the hint, Mark. Does the following look correct to you? > I've just tested that it also fixes the issue on AIX, and I got no > regression on amd64-linux. > > 2009-05-07 Joel Brobecker > > * c-lang.c (print_wchar): Convert w into a gdb_wchar_t before > pushing it on the output obstack. > > + gdb_wchar_t wchar = (gdb_wchar_t) w; Is that cast necessary? Otherwise, this looks excellent to me.