diff --git a/source/ast/symbols/BlockSymbols.cpp b/source/ast/symbols/BlockSymbols.cpp index 4ed5d60ba..01e613969 100644 --- a/source/ast/symbols/BlockSymbols.cpp +++ b/source/ast/symbols/BlockSymbols.cpp @@ -611,10 +611,10 @@ GenerateBlockArraySymbol& GenerateBlockArraySymbol::fromSyntax(Compilation& comp } SmallVector entries; - auto createBlock = [&, loc = loc](ConstantValue value, bool isUninstantiated) { + auto createBlock = [&, blockLoc = loc](ConstantValue value, bool isUninstantiated) { // Spec: each generate block gets their own scope, with an implicit // localparam of the same name as the genvar. - auto block = compilation.emplace(compilation, "", loc, + auto block = compilation.emplace(compilation, "", blockLoc, (uint32_t)entries.size(), isUninstantiated); auto implicitParam = compilation.emplace( diff --git a/source/ast/types/AllTypes.cpp b/source/ast/types/AllTypes.cpp index f119bb80b..65b3e40ff 100644 --- a/source/ast/types/AllTypes.cpp +++ b/source/ast/types/AllTypes.cpp @@ -995,7 +995,7 @@ const Type& PackedUnionType::fromSyntax(Compilation& comp, const StructUnionType // In tagged unions the tag contributes to the total number of packed bits. if (isTagged && fieldIndex) { - unionType->tagBits = std::bit_width(fieldIndex - 1); + unionType->tagBits = (uint32_t)std::bit_width(fieldIndex - 1); unionType->bitWidth += unionType->tagBits; }