bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Miscellaneous code readability improvements.


From: Joel E. Denny
Subject: Re: [PATCH] Miscellaneous code readability improvements.
Date: Sat, 29 Aug 2009 16:51:48 -0400 (EDT)
User-agent: Alpine 1.00 (DEB 882 2007-12-20)

On Fri, 28 Aug 2009, Eric Blake wrote:

> According to Joel E. Denny on 8/28/2009 2:51 AM:
> > The second one looks easy to fix, but I'm not actually seeing either of 
> > the warnings.  What gcc and flex are you using?  Here are mine:
> 
> flex 2.5.35
> gcc 3.4.4

Thanks.  I pushed the following to master and branch-2.5.  I think it'll 
fix the named_ref shadowing warning you saw.

For the warning you found on branch-2.4.2, the cause is not immediately 
obvious to me, and I'm not inclined to chase it down.  As for the other 
warning, I don't see it from a newer gcc.  In this case, we're also 
dealing with flex-generated code, which is not usually fun to work around.

>From 2646cd540bfdd35f457e0e0a1bcc5f9b26a96849 Mon Sep 17 00:00:00 2001
From: Joel E. Denny <address@hidden>
Date: Sat, 29 Aug 2009 16:25:58 -0400
Subject: [PATCH] Fix gcc 3.4.4 shadowing warning reported by Eric Blake.

See
<http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00093.html>.
* src/scan-code.h (code_props_rule_action_init): Rename
named_ref arg to name so it doesn't shadow named_ref type.  This
makes it consistent with the function definition in scan-code.l
anyway.
---
 ChangeLog       |   10 ++++++++++
 src/scan-code.h |    2 +-
 2 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 4de30cf..3e6fd1b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2009-08-29  Joel E. Denny  <address@hidden>
+
+       Fix gcc 3.4.4 shadowing warning reported by Eric Blake.
+       See
+       <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00093.html>.
+       * src/scan-code.h (code_props_rule_action_init): Rename
+       named_ref arg to name so it doesn't shadow named_ref type.  This
+       makes it consistent with the function definition in scan-code.l
+       anyway.
+
 2009-08-28  Joel E. Denny  <address@hidden>
 
        %define: accept unquoted values.
diff --git a/src/scan-code.h b/src/scan-code.h
index 11cf5d0..c98a54a 100644
--- a/src/scan-code.h
+++ b/src/scan-code.h
@@ -134,7 +134,7 @@ void code_props_symbol_action_init (code_props *self, char 
const *code,
  */
 void code_props_rule_action_init (code_props *self, char const *code,
                                   location code_loc, struct symbol_list *rule,
-                                 named_ref *named_ref);
+                                  named_ref *name);
 
 /**
  * \pre
-- 
1.5.4.3





reply via email to

[Prev in Thread] Current Thread [Next in Thread]