diff --git a/src/parser/parser.cc b/src/parser/parser.cc index d8eea8f4288ed..7277114c3cc39 100644 --- a/src/parser/parser.cc +++ b/src/parser/parser.cc @@ -1008,7 +1008,8 @@ class Parser { Consume(TokenType::kSemicolon); // Add the bindings to the local data structure. - bindings.push_back({var, val, span}); + std::tuple tuple(var, val, span); + bindings.push_back(tuple); scopes++; PushScope(); } else { diff --git a/src/parser/tokenizer.h b/src/parser/tokenizer.h index 4ce0510761e3d..20ad1734e5730 100644 --- a/src/parser/tokenizer.h +++ b/src/parser/tokenizer.h @@ -194,7 +194,8 @@ struct Tokenizer { auto suffix = number.substr(suffix_pos + 1, number.size() - suffix_pos); - int width; + int width = 32; + if (suffix.size()) { try { width = std::stoi(suffix); @@ -202,8 +203,6 @@ struct Tokenizer { this->diag_ctx.Emit(Diagnostic::Error(token->span) << "invalid numeric suffix `" << suffix << "`"); } - } else { - width = 32; } double value = stod(literal_text);