help-bison
[Top][All Lists]
Advanced

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

How to get rid of warnings in Bison?


From: Bernd Clausen
Subject: How to get rid of warnings in Bison?
Date: Tue, 30 Jul 2013 21:52:19 +0200 (CEST)

Hi,

I get a lot of warnings in my project. Here is one excerpt of my grammar file:

stmtlist : stmt ';'           { printf(".."); }
         | stmtlist stmt ';'  { printf(".."); }
;

1. line -> warning: unused value: $1
2. line -> warning: unused value: $2

The problem is that I don't want to use $1 and $2. Is there a better solution 
to get rid of these warnings than to call Bison with "-Wno-other"???

I also get the warning that $$ is not set in some rules. How can I solve this 
issue? Should I always set $$ to a value? What if I have rules which clean the 
parsing stack and only perform some actions without modifying the stack. $$ 
always puts a new value on the parsing stack, right?

Cheers,
Bernd
 



reply via email to

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