This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Using __extension__ in a struct with a GTY(()) mark
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- To: geoffk at apple dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 3 Apr 2003 01:16:04 -0500 (EST)
- Subject: Re: Using __extension__ in a struct with a GTY(()) mark
- References: <D67E4044-6568-11D7-9604-0030657EA24A@apple.com>
> 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