This is the mail archive of the gcc@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]
Other format: [Raw text]

Re: Using __extension__ in a struct with a GTY(()) mark


 > From: Geoffrey Keating <geoffk at apple dot com>
 > 
 > On Wednesday, April 2, 2003, at 03:00  PM, Kaveh R. Ghazi wrote:
 > 
 > > The problem I'm having now is that I need to add the __extension__
 > > keyword to the struct so that it doesn't get a complaint from GCC.
 > > Not being very fluent in bison or flex, I can't seem to get gengtype
 > > to accept it.
 > 
 > You want to simply ignore the __extension__, right?
 > 
 > If so, you can put it after
 > 
 > "const"/[^[:alnum:]_]           /* don't care */
 > 
 > like
 > 
 > "__extension__"/[^[:alnum:]_]   /* ignore */
 > 
 > in gengtype-lex.l.
 > 
 > > In the end, I'm trying to get this struct parsed by gengtype:
 > >
 > > struct lang_type_header GTY(())  __extension__


Thanks, that worked.  However in the mean time I was able to get
__extension__ to work in gengtype without this change by putting the
keyword at the beginning of the line instead of the end.
http://gcc.gnu.org/ml/gcc-patches/2003-04/msg00175.html

Still, having gengtype quietly ignore __extension__ might nevertheless
be a useful change to consider.  I could imagine someone else might
need to do it.  Thoughts?

		--Kaveh
--
Kaveh R. Ghazi			ghazi at caip dot rutgers dot edu


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