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: revised proposal for GCC and non-Ascii source files


> This raises the issue of how we tell native extended character X from native
> ASCII character %.  I'm beginning to suspect we need the more general locale
> information, not just the charset.

Paul suggested that you can test whether you are in the initial state
when using the multibyte functions. If that is true, and if we assume
that the initial state is ASCII (as mandated by the C and C++
standards), we have a test whether a single byte we just saw really is
from the base character set.

Furthermore, the standards require that we are in the initial state
after each identifier. So we have good reason to reject

<escape>printf<funny characters>("Hello world");<escape to ASCII>

The escape back to ASCII must occur right after <funny characters>,
and should probably count as part of the identifier.

Regards,
Martin


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