This is the mail archive of the gcc-patches@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: Patch: ctype.h replacement


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.

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