This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Implementing Universal Character Names in identifiers
- From: loewis at informatik dot hu-berlin dot de (Martin v. Löwis)
- To: Neil Booth <neil at daikokuya dot co dot uk>
- Cc: Zack Weinberg <zack at codesourcery dot com>, gcc-patches at gcc dot gnu dot org, java at gcc dot gnu dot org
- Date: 11 Nov 2002 17:36:45 +0100
- Subject: Re: Implementing Universal Character Names in identifiers
- References: <200210280715.g9S7FdI2003815@paros.informatik.hu-berlin.de><20021028075111.GB1273@codesourcery.com><j4wuo39c6o.fsf@informatik.hu-berlin.de><20021028183910.GC24090@codesourcery.com><20021110183919.GA25374@daikokuya.co.uk>
Neil Booth <neil@daikokuya.co.uk> writes:
> > - In libiberty, provide interfaces that implement UAX15. On
> > reflection, this should be a new <unicode.h> interface set, not
> > tacked onto <safe-ctype.h>.
> >
> > - In cpplib, provide routines that validate individual identifiers
> > against the precise lists in C99 and C++98.
>
> Are you going to do this part? It would be a good start. We could
> do with a function that confirms whether a number is in the ranges
> specified by the standards (separating the two if necessary, although
> IMO that is pedantry in extremis).
I'm still not sure why this should be in libiberty. The list of
acceptable characters is quite specific to the preprocessor.
However, I am working on updating this function for C99.
> We also need something like ucs_digit_p(), since a UCS digit cannot
> start an identifier (something I think you missed in your patch).
It's not an issue for C++: it does not allow UCS digits in an
identifier (nor does it allow what C99 calls "Special characters" -
I'm not even certain whether C99 intends to allow them in identifiers,
and if so, whether on arbitrary positions).
Regards,
Martin