[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2] Avoid warnings from gcc -Wunused y.tab.c
From: |
Joel E. Denny |
Subject: |
Re: [PATCH v2] Avoid warnings from gcc -Wunused y.tab.c |
Date: |
Tue, 15 Dec 2009 23:01:09 -0500 (EST) |
User-agent: |
Alpine 1.00 (DEB 882 2007-12-20) |
Hi Jonathan,
On Tue, 15 Dec 2009, Jonathan Nieder wrote:
> Here is an updated patch incorporating all your suggestions except for
> the last one.
I didn't see this before responding to your previous email.
> Joel E. Denny wrote:
>
> > How does the b4_locations_if part of this change help? If it isn't really
> > necessary, then let's drop it. As far as I can tell, the addition of
> > `defined YYLTYPE_IS_TRIVIAL &&' is sufficient.
>
> I tried to make it a little clearer what the conditional is for in
> this version. If you still think the conditional should be dropped,
> let me know and I’ll send a version without it.
Ok, thanks, but I'd still like it to be a separate patch.
> >From 81895390b3b97540e4ade42031449700d10d62bd Mon Sep 17 00:00:00 2001
> From: Jonathan Nieder <address@hidden>
> Date: Sat, 12 Dec 2009 15:43:18 -0600
> Subject: [PATCH] Avoid warnings from gcc -Wunused y.tab.c
>
> Building bison-produced parsers can result in a few warnings:
>
> y.tab.c:383:6: warning: "YYENABLE_NLS" is not defined
> y.tab.c:1271:6: warning: "YYLTYPE_IS_TRIVIAL" is not defined
>
> These warnings are not revealing any actual problem (it is
> perfectly reasonable to use #if FOO even if FOO is not defined).
> Suppress them by checking if preprocessor symbols are defined
> before using their values.
>
> While at it, do not use the YYLTYPE_IS_TRIVIAL symbol in the
> generated parser source if location tracking is not enabled.
> (Most uses were protected by b4_locations_if already.)
I'm sorry I didn't make this clear before, but ChangeLog entries and git
log entries should be the same (except that the blank line following the
first line of a git log entry is usually removed in the ChangeLog entry).
If you'd like, I can go ahead and revise your patch. If I don't hear from
you again by tomorrow, I'll probably just go ahead and do that.
Thanks.
- Re: several messages, (continued)
- Re: several messages, Joel E. Denny, 2009/12/15
- Re: several messages, Jonathan Nieder, 2009/12/15
- Re: several messages, Joel E. Denny, 2009/12/15
- Re: several messages, Jonathan Nieder, 2009/12/15
- Re: several messages, Joel E. Denny, 2009/12/15
- Re: several messages, Jonathan Nieder, 2009/12/15
- Re: several messages, Joel E. Denny, 2009/12/15
- Re: several messages, Joel E. Denny, 2009/12/16
- Re: several messages, Joel E. Denny, 2009/12/16
- [PATCH v2] Avoid warnings from gcc -Wunused y.tab.c, Jonathan Nieder, 2009/12/15
- Re: [PATCH v2] Avoid warnings from gcc -Wunused y.tab.c,
Joel E. Denny <=