This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch: ctype.h replacement
- To: Zack Weinberg <zackw at stanford dot edu>
- Subject: Re: Patch: ctype.h replacement
- From: Neil Booth <neilb at earthling dot net>
- Date: Mon, 27 Nov 2000 18:37:14 +0000
- Cc: gcc-patches at gcc dot gnu dot org
- References: <20001127094428.D2285@wolery.stanford.edu>
Hi Zack,
I'm not sure about what you've done to cpplib.
For example,
> -#define ISspace 0x20 /* ' ' \t \r \n \f \v \0 */
> -#define is_space(x) (_cpp_IStable[x] & ISspace)
is not the same as
isspace ()
unless this includes NUL (?). Our handling of NULs relies on this, I
think; unfortunately test cases don't seem to be possible without
screwing up CVS.
Another thing is that I was going to introduce extra character classes
to speed up comment parsing, which is probably dog slow right now.
Like have a set of characters that are interesting in a comment ('/'
'*' '\' '?' '\t' '\n' '\r' off the top of my head). We could then
skip the others quickly, rather than have every char go through these
separate tests.
Neil.