Checking wide format strings
Joseph S. Myers
jsm28@cam.ac.uk
Sat Dec 9 09:31:00 GMT 2000
On Wed, 6 Dec 2000, Jakub Jelinek wrote:
> On Wed, Dec 06, 2000 at 02:09:17PM +0000, Joseph S. Myers wrote:
> > 1. Could someone add the relevant information where c-tree.texi says
> >
> > FIXME: How are wide strings represented?
>
> I came accross this when writing the designated initializers patch as well,
> had to write wide char handling myself.
> Probably it would be good if there was some function like
> read_wide_string(tree wstr, tree pos) which would read POSth wide character
> from wide string constant wstr and return it as a tree of type
> wchar_type_node.
Could we also have a better way of determining whether a string constant
is narrow or wide than looking at its type? Looking at its type doesn't
work when wchar_t is char; and though a bug in the C99 standard means that
wchar_t can be signed char or unsigned char but not plain char, I'm not
convinced that the few targets using char for wchar_t should be changed to
signed or unsigned char on account of that bug.
--
Joseph S. Myers
jsm28@cam.ac.uk
More information about the Gcc
mailing list