help-bison
[Top][All Lists]
Advanced

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

warning: unused value: $3


From: henrik . sorensen
Subject: warning: unused value: $3
Date: Wed, 25 Oct 2006 17:05:50 +0200
User-agent: KMail/1.9.1

Hi Bison list,

using bison version 2.2.
Message from bison:
pl1-parser.y:873.17-63: warning: unused value: $3

This warning I find a bit confusing...


Line 873 contains: |    procoptionlist ',' {$$=$1;} procoption {$$=$1;}
$3 refers to the embedded action after the comma.

My grammar set a number of attributes in an allocated structure using $0 to 
reference the structure on the stack. The full rules are as follow

procoptionlist:
  { $<pol>$ = newProcOptionList(); } 
          procoption 
  { $$ = $<pol>1; }
|       procoptionlist procoption {$$=$1;}
|       procoptionlist ',' {$$=$1;} procoption {$$=$1;}
        ;

procoption:
        MAIN { if(setTristateAttribute(&($<pol>0)->main,1)<0) YYERROR; }
;


unless I am missing something $3 in line 873 is by the rule procoption.
Is there anyway to supress this IMO, unnecessary warning.

thanks for your help
Henrik

pl1gcc.sourceforge.net




reply via email to

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