Skip to content

Commit 913f679

Browse files
joyeecheungV8 LUCI CQ
authored andcommitted
Fix non-conforming braced-init-list in value_or()
value_or() is a function template that deduces its argument type. Passing a braced-init-list {} causes deduction to fail in GCC because {} has no type: wasm-shuffle-reducer.cc:576: error: no matching member function for call to 'value_or' note: candidate template ignored: couldn't infer template argument Clang only accepted it by chance. Replace {} with uint8_t{0} to make the type explicit. Refs: https://eel.is/c++draft/temp.deduct.call Refs: nodejs/node#62572 Change-Id: I589617c78fbc1a65a3475957f846ffb87364ff28 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7726131 Reviewed-by: Matthias Liedtke <[email protected]> Commit-Queue: Joyee Cheung <[email protected]> Cr-Commit-Position: refs/heads/main@{#106357}
1 parent 6bb0449 commit 913f679

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/compiler/turboshaft/wasm-shuffle-reducer.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ void WasmShuffleAnalyzer::TryReduceFromMSB(OpIndex input,
573573
uint8_t index = shuffle.shuffle[i];
574574
if (index >= lower_limit && index <= upper_limit) {
575575
max = std::max(static_cast<uint8_t>(index % kSimd128Size),
576-
max.value_or({}));
576+
max.value_or(uint8_t{0}));
577577
}
578578
}
579579
if (max) {

0 commit comments

Comments
 (0)