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: egcs-bugs at egcs dot cygnus dot com, gcc-patches at gcc dot gnu dot org, zack at wolery dot cumb dot org
- Subject: Re: cpplib: don't modify the IStable for '$' in identifiers
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Date: Sat, 4 Mar 2000 11:01:52 -0500 (EST)
> 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.
>
> There's still a dependence on the globals user_label_prefix and
> std_prefix. This is only an issue if you use extremely obscure
> options. '$' in identifiers changes with -ansi, which is not that
> uncommon. Also, those globals are not really under cpplib's control;
> they belong to the back end and the driver.
>
> Also, a couple of unrelated static data structures are now constant.
>
> I can't bootstrap because of the strlensi problem, but I have compiled
> cpplib and verified that $ is still handled properly in both modes.
>
> zw
>
> * cppinit.c: Delete all references to FAKE_CONST and CAT
> macros. Define init_IStable as empty macro if gcc >=2.7 or
> C99. Change TABLE() to ISTABLE and hardcode name of table.
> (cpp_start_read): Don't change the IStable based on
> dollars_in_ident.
Zack,
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
--Kaveh
--
Kaveh R. Ghazi Engagement Manager / Project Services
ghazi@caip.rutgers.edu Qwest Internet Solutions