[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
if (false) goto yyerrorlab; triggers a warning
From: |
Alexey Feldgendler |
Subject: |
if (false) goto yyerrorlab; triggers a warning |
Date: |
Wed, 04 Jul 2007 14:35:20 +0200 |
User-agent: |
Opera Mail/9.50 (Linux) |
Some compilers (MS VisualStudio at least) throw a warning "unreachable
code" on this part of the parser:
yyerrorlab:
/* Pacify compilers like GCC when the user code never invokes
YYERROR and the label yyerrorlab therefore never appears in user
code. */
if (false)
goto yyerrorlab;
That's correct, the code is unreachable, so we have one warning replaced
with another. I'm afraid that inclusion of this code has to be made
conditional depending on whether YYERROR is acutally used anywhere.
--
Alexey Feldgendler <address@hidden>
[ICQ: 115226275] http://feldgendler.livejournal.com
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- if (false) goto yyerrorlab; triggers a warning,
Alexey Feldgendler <=