From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7287 invoked by alias); 4 Jun 2012 21:19:22 -0000 Received: (qmail 7279 invoked by uid 22791); 4 Jun 2012 21:19:21 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,TW_YY,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 04 Jun 2012 21:19:09 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3) with ESMTP id q54LJ4Pf011814; Mon, 4 Jun 2012 23:19:04 +0200 (CEST) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3/Submit) id q54LJ1Qi007466; Mon, 4 Jun 2012 23:19:01 +0200 (CEST) Date: Mon, 04 Jun 2012 21:19:00 -0000 Message-Id: <201206042119.q54LJ1Qi007466@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: sergiodj@redhat.com CC: tromey@redhat.com, gdb-patches@sourceware.org In-reply-to: (message from Sergio Durigan Junior on Mon, 04 Jun 2012 17:49:12 -0300) Subject: Re: [PATCH 03/10] C language References: <1338665528-5932-1-git-send-email-sergiodj@redhat.com> <1338665528-5932-4-git-send-email-sergiodj@redhat.com> <87lik2n7ik.fsf@fleche.redhat.com> <201206042042.q54Kg4mU002330@glazunov.sibelius.xs4all.nl> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-06/txt/msg00103.txt.bz2 > From: Sergio Durigan Junior > 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.