This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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: [PATCH 03/10] C language


> From: Sergio Durigan Junior <sergiodj@redhat.com>
> Date: Mon, 04 Jun 2012 17:49:12 -0300
> 
> On Monday, June 04 2012, Mark Kettenis wrote:
> 
> > I hesitated to bring it up, but when I was looking into using the yacc
> > -p option to get rid of the #defines, the underscored names posed a
> > problem.
> >
> > So if you go through the trouble of renaming things, it might make
> > sense to use a consistent prefix ($LANG_) and give the wrappers
> > different names.
> 
> Do you mean what Tom meant (i.e., using `$LANG_parse_internal' instead of
> `_$LANG_parse'), or a bigger change?

I guess a bigger change.  If you do:

yacc -p c_ c-exp.c

you'll end up with a .c file that contains:

#define yyparse c_parse

but since c-exp.c already defines a function named c_parse, that
becomes problematic.

But I just realised that you can work around the problem, by doing

#undef yyparse
#define yyparse c_parse_internal

So never mind.


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