cpplib: don't modify the IStable for '$' in identifiers

Kaveh R. Ghazi ghazi@caip.rutgers.edu
Sat Mar 4 08:01:00 GMT 2000


 > 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


More information about the Gcc-patches mailing list