This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch to use more safe-ctype macros
On Mon, Oct 22, 2001 at 10:48:03PM -0600, Tom Tromey wrote:
> >>>>> "DJ" == DJ Delorie <dj@redhat.com> writes:
>
> >> (I asked for EBCDIC versions of safe-ctype months ago, and no one
> >> responded.)
>
> DJ> You may contribute a patch to add EBCDIC support if you wish.
>
> If we add EBCDIC support to safe-ctype, then the changes to gjavah.c
> are incorrect. gjavah.c uses Unicode internally. The current changes
> "work" because Unicode is a superset of ASCII. But if, say, ISALNUM
> starts interpreting its argument as EBCDIC, then the code in
> jni_print_char will be wrong.
I've thought casually that it might be a good idea to assimilate EBCDIC
support into complete national-charset support. In other words, even
on a naturally EBCDIC host, we would use ASCII^H^H^H^H^HUnicode
internally, and convert back for object files.
This would be a major undertaking with a number of undesirable side
effects. For starters, we could not use character constants anywhere.
The readability of all our lexical analyzers would take a severe hit.
I think we would also be unable to use Yacc anymore.
zw