gcc.dg/cpp/charconst.c vs. WCHAR_TYPE "long int"
Neil Booth
neil@daikokuya.demon.co.uk
Fri Mar 22 13:35:00 GMT 2002
Franz Sirl wrote:-
> > > > But first I'd like to understand why this is happening. What is the
> > > > type of wchar_t on your system and how many bytes is it? What about
> > > > int? I can only see this happening if your int is 16 bits and wchar_t
> > > > 32, or 32 / 64 respectively.
> > >
> > > WCHAR_TYPE_SIZE is 32, WCHAR_TYPE is "long int" and INT_TYPE_SIZE is 32
> > > (see rs6000/sysv4.h and rs6000/rs6000.h).
> >
> > I don't understand why there is a diagnostic, then. This is the same as
> > Linux, no? Why don't I see a diagnostic?
>
> on x86-linux the sizes are the same, but WCHAR_TYPE is "int" not "long int"
> as on powerpc-linux. My guess was that the int<->long int promotion rules
> mandated this warning?
I'll build a cross compiler and investigate further, if only so I
understand exactly what's going on.
Neil.
More information about the Gcc
mailing list