This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: [RFH] Getting rid of WCHAR_TYPE_SIZE


Neil Booth wrote:-

> Successfully removing WCHAR_UNSIGNED tempted me to look at
> getting rid of WCHAR_TYPE_SIZE like Mark suggested.
> 
> It turns out there is only one user in the whole compiler,
> and it's in Ada (huh?).  In targtyps.c, we have:
> 
> Pos
> get_target_wchar_t_size ()
> {
>   /* We never want wide chacters less than "short" in Ada.  */
>   return MAX (SHORT_TYPE_SIZE, WCHAR_TYPE_SIZE);
> }
> 
> It seems a shame to have to maintain over 200 lines of #define
> and #undef gunk just for this.  Can someone suggest a replacement?

And, FWIW, WCHAR_TYPE_SIZE is in general a run-time constant
based upon target options and e.g. -fshort-wchar.  So the above
code wouldn't seem to suffice (a flaw of the macro, really).  So
please let's find a way to nuke its use here.

Neil.


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