This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [RFC-v5] Handle cygwin wchar_t specifics
- From: "Pierre Muller" <pierre dot muller at ics-cnrs dot unistra dot fr>
- To: "'Pedro Alves'" <pedro at codesourcery dot com>, <gdb-patches at sourceware dot org>
- Cc: "'Tom Tromey'" <tromey at redhat dot com>
- Date: Thu, 21 Apr 2011 08:57:04 +0200
- Subject: RE: [RFC-v5] Handle cygwin wchar_t specifics
- References: <5928.31498147479$1302882967@news.gmane.org> <m3wriq3zbu.fsf@fleche.redhat.com> <000201cbff30$e2266030$a6732090$@muller@ics-cnrs.unistra.fr> <201104202208.15956.pedro@codesourcery.com>
> -----Message d'origine-----
> De?: gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Pedro Alves
> Envoyé?: mercredi 20 avril 2011 23:08
> À?: gdb-patches@sourceware.org
> Cc?: Pierre Muller; 'Tom Tromey'
> Objet?: Re: [RFC-v5] Handle cygwin wchar_t specifics
>
> On Wednesday 20 April 2011 08:59:31, Pierre Muller wrote:
> > +static char your_gdb_wchar_t_is_bogus[(sizeof (gdb_wchar_t) == 2
> > + || sizeof (gdb_wchar_t) == 4)
> > + ? 1 : -1];
> > +
>
> Didn't "extern" work?
I didn't test it out before:
it does work on my system, but is it
sure it will compile and link correctly on
all C compilers used for GDB?
There is apparently no trace of your_gdb_wchar_t_is_bogus
in my charset.o object file once it is made external.
Could someone confirm that this will also compile
on other C compiler used without creating link failures?
I am perfectly willing to change this but it seemed
to me to rely on some "obscure C compiler feature"
(don't forget that I learned C to be able to support pascal
language in GDB...).
Pierre