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
 

_______________________________________________
[email protected] https://lists.gnu.org/mailman/listinfo/help-bison

Reply via email to