This is the mail archive of the gcc-patches@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: Merge cpplib and front end hashtables, part 1


Michael Meissner wrote:-

> > But since some header files are system header files, clearly the whole
> > translation unit cannot be in a single charset.
> 
> Ummm, I know it is currently late at night for me, but for C89, IIRC, it was
> the intention of the committee that the entire translation unit be in a single
> charset and that the compiler does the equivalent of setlocale (LC_ALL, "").
> Certainly the way I read the first stage of translation in C99's 5.1.1.2, the
> compiler does logically translate everything into the source character set.

Hmm.  OK, I'd assumed the system header files would remain ASCII.

> The characters needed for the C langauge must be present in any
> encoding, and I believe they must have the exact same encoding
> (though I don't recall exactly where in the standard this is set
> down, though it may be the section that describes L"" strings).
> Thus for instance: "X"[0] == L"X"[0]

But Japanese SJIS, for example, is state-dependent and ASCII codes can
mean something quite different.  This already causes problems when
people write C++ comments in Japanese; sometimes a Japanese character
appears to be a line-continuing backslash to CPP.

But I'm a little confused about this issues, so I probably have the
wrong idea.

I think Zack was intending that encoding be per-file, at least by my
reading of projects/cpplib.html.

Neil.


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