Hi, my usage is yielding me a block like this:

---------


/*---------------------------------------------------.
| yyerrorlab -- error raised explicitly by YYERROR.  |
`---------------------------------------------------*/
yyerrorlab:

  /* Pacify compilers like GCC when the user code never invokes
     YYERROR and the label yyerrorlab therefore never appears in user
     code.  */
  if (/*CONSTCOND*/ 0)
     goto yyerrorlab;

  /* Do not reclaim the symbols of the rule whose action triggered
     this YYERROR.  */
  YYPOPSTACK (yylen);
  yylen = 0;
  YY_STACK_PRINT (yyss, yyssp);
  yystate = *yyssp;
  goto yyerrlab1;


---------

There, the `goto yyerrorlab;` line is annotated by this Xcode
message: "Semantic Issue: Code will never be executed: _____.tab.c:
Silence by adding parentheses to mark code as explicitly dead".

The comment is really clear and I think I know what is happening and
what I might be doing wrong.

However, just to let you know that Xcode proposes some fix. If
chosen, then the line:

  if (/*CONSTCOND*/ 0)

turns to:

    if (/*CONSTCOND*/ /* DISABLES CODE */ (0))

So telling you, in case you wanted to change the line permanently in
your sources. I don’t normally code C/C++, so please forgive me if I
overlooked something!
_______________________________________________
help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison

Reply via email to