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]

Re: Wide characters and GCC


On Wed, 6 Jun 2001, Neil Booth wrote:

> Joseph S. Myers wrote:-
> 
> > Do we support target wchar_t wider than HOST_WIDE_INT in GCC?
> 
> No, not properly.  But I think it's only a hypothetical case.  I

This doesn't really help work out what to do when adding generic
interfaces to access narrow and wide characters from strings :-).  I want
to implement wide string format checking (wprintf etc.) without adding yet
another ad hoc system for access to wide strings.  The code for breaking
up strings to handle designated initializers carefully constructs an
INTEGER_CST for each element (so allowing for 2 * HOST_BITS_PER_WIDE_INT
bits), but most other places allow at most one HOST_WIDE_INT.  I don't
particularly want to break the careful allowing for 2 *
HOST_BITS_PER_WIDE_INT gratuitously, but for most of the uses having a
host integer would be more convenient than a tree.  Nor do I want to do
the work to make GCC use a more general multiple precision representation
for all target integers, as sometimes talked about, though I hope this
gets done eventually.  So what's needed is a decision:

* Can we require that MAX_WCHAR_TYPE_SIZE <= HOST_BITS_PER_WIDE_INT (and 
fail to compile GCC if it isn't)?

* If not, can we require that MAX_WCHAR_TYPE_SIZE <=
HOST_BITS_PER_WIDEST_INT (and fail to compile GCC if it isn't)?

-- 
Joseph S. Myers
jsm28@cam.ac.uk


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