bison-patches
[Top][All Lists]
Advanced

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

[PATCH 0/2] avoid some warnings from gcc -c -Wall -W y.tab.c


From: Jonathan Nieder
Subject: [PATCH 0/2] avoid some warnings from gcc -c -Wall -W y.tab.c
Date: Sat, 12 Dec 2009 15:41:27 -0600
User-agent: Mutt/1.5.20 (2009-06-14)

Hi bison developers,

I noticed a few warnings when building mawk:

compiling parse.c
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).  They look
simple to fix, and a quick Google search shows all kinds of projects
unnecessarily defining these symbols to work around the warnings, so I
figure, why not suppress them here at the source?

These two patches do that.  Perhaps they could be useful.  The result
still passes the test suite here.

Jonathan Nieder (2):
  Check if YYENABLE_NLS is defined before checking its value
  Do not depend on YYLTYPE_IS_TRIVIAL unless locations are requested

 data/glr.c    |    4 ++--
 data/lalr1.cc |    2 +-
 data/yacc.c   |   10 ++++++----
 3 files changed, 9 insertions(+), 7 deletions(-)




reply via email to

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