Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(141)

Unified Diff: runtime/vm/parser.cc

Issue 8222017: Fix compilation warnings/errors seen with newer versions of gcc compiler. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/snapshot.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
===================================================================
--- runtime/vm/parser.cc (revision 265)
+++ runtime/vm/parser.cc (working copy)
@@ -3663,7 +3663,6 @@
TRACE_PARSER("ParseCaseStatement");
bool default_seen = false;
intptr_t case_pos = token_index_;
- intptr_t expr_pos = 0;
SequenceNode* case_expressions =
new SequenceNode(case_pos, current_block_->scope);
while (CurrentToken() == Token::kCASE || CurrentToken() == Token::kDEFAULT) {
@@ -3672,11 +3671,11 @@
ErrorMsg("default clause must be last case");
}
ConsumeToken(); // Keyword case.
- expr_pos = token_index_;
+ intptr_t expr_pos = token_index_;
AstNode* expr = ParseExpr(kAllowConst);
AstNode* switch_expr_load = new LoadLocalNode(case_pos,
*switch_expr_value);
- AstNode* case_comparison = new ComparisonNode(case_pos,
+ AstNode* case_comparison = new ComparisonNode(expr_pos,
Token::kEQ,
expr,
switch_expr_load);
@@ -3686,7 +3685,6 @@
ErrorMsg("only one default clause is allowed");
}
ConsumeToken(); // Keyword default.
- expr_pos = token_index_;
default_seen = true;
// The default case always succeeds.
}
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/snapshot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698