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


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

Reply via email to