This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Fix typo in type of parameter "w" in print_wchar...


> Date: Thu, 7 May 2009 11:37:53 -0700
> From: Joel Brobecker <brobecker@adacore.com>
> 
> > 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  <brobecker@adacore.com>
> 
>         * 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]