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: [RFC-v5] Handle cygwin wchar_t specifics



> -----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




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