This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Use the wctype builtins functions
- From: Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- To: Shujing Zhao <pearly dot zhao at oracle dot com>
- Cc: gcc at gcc dot gnu dot org, ghazi at caip dot rutgers dot edu
- Date: Fri, 05 Mar 2010 14:03:03 +0000
- Subject: Re: Use the wctype builtins functions
- References: <4B906D54.5050409@oracle.com>
On 05/03/2010 02:32, Shujing Zhao wrote:
> Hi,
>
> I want to use the the wctype builtins ISWALPHA and the other ISW*
> functions to handle the wide character string, but I get the following
> error:
>
> /home/gcc/build/gcc/../../trunk/gcc/opts.c:1190: undefined reference to
> `ISWALPHA'
> collect2: ld returned 1 exist status
>
> I have tried to grep some examples that use the ISW* builtins, but
> didn't find any one. Does anyone know how to use them?
The capitalised versions of the IS* functions are macros from safe-ctype.h,
not builtins, and it hasn't been extended with ISW* versions because it's
based on an array and it would need rather a large array to cope with wchars!
I think you'll probably have to use plain old iswalpha. Looking at opts.c,
I'm guessing you're trying to extend the help string format to allow unicode?
cheers,
DaveK