This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: cpplib: don't modify the IStable for '$' in identifiers
- To: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Subject: Re: cpplib: don't modify the IStable for '$' in identifiers
- From: Zack Weinberg <zack at wolery dot cumb dot org>
- Date: Sat, 4 Mar 2000 09:49:45 -0800
- Cc: egcs-bugs at egcs dot cygnus dot com, gcc-patches at gcc dot gnu dot org
- References: <200003041601.LAA27559@caip.rutgers.edu>
On Sat, Mar 04, 2000 at 11:01:52AM -0500, Kaveh R. Ghazi wrote:
> > From: Zack Weinberg <zack@wolery.cumb.org>
> >
> > This patch changes the definitions of is_idchar and is_idstart so they
> > check dollars_in_ident directly, rather than expecting '$' to appear
> > in the IStable. That, in turn, means we can make the IStable
> > read-only data, and eliminate the last bit of cpplib internal state
> > maintained outside the cpp_reader structure.
...
> The !GCC case fails in this file. Here's what I get on
> solaris2.7 with cc:
>
> > "../../egcs-CVS20000304/gcc/cppinit.c", line 229: undefined symbol: id
Argh - missed one. Patch:
===================================================================
Index: cppinit.c
--- cppinit.c 2000/03/04 01:42:56 1.49
+++ cppinit.c 2000/03/04 17:49:33
@@ -216,7 +216,7 @@ enum { QUOTE = 0, BRACKET, SYSTEM, AFTER
#else
#define ISTABLE unsigned char _cpp_IStable[256] = { 0 }; \
static void init_IStable PARAMS ((void)) { \
- unsigned char *x = id;
+ unsigned char *x = _cpp_IStable;
#define END }
#define s(p, v) x[p] = v;
#endif