new pacification suggestion?

2018-11-15 Thread Uxio Prego
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

Re: new pacification suggestion?

2018-11-15 Thread Uxio Prego



> On 15 Nov 2018, at 21:35, Uxio Prego  wrote:
> 
> Hi, my usage is yielding me a block like this:
> 
> ...

If I'm not mistaken, this is happening exactly the same in either Bison
2.3 and 3.1, and according
https://stackoverflow.com/a/14186528/1737973
the compiler would be... Apple LLVM 9.0, yeah one of you advised me
to upgrade, but I've been lazy about that. :/

Apple LLVM versions mapping to upstream clang:
https://en.wikipedia.org/wiki/Xcode#Latest_versions

___
help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison