[Webkit-unassigned] [Bug 224826] New: Static asserts in WasmAirIRGenerator.cpp and WasmB3IRGenerator.cpp trigger -Wnonnull warnings with GCC 11
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Apr 20 12:54:36 PDT 2021
https://bugs.webkit.org/show_bug.cgi?id=224826
Bug ID: 224826
Summary: Static asserts in WasmAirIRGenerator.cpp and
WasmB3IRGenerator.cpp trigger -Wnonnull warnings with
GCC 11
Product: WebKit
Version: WebKit Nightly Build
Hardware: PC
OS: Linux
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: mcatanzaro at gnome.org
These asserts are understandably triggering -Wnonnull warnings:
static_assert(sizeof(decltype(static_cast<Instance*>(nullptr)->cachedStackLimit())) == sizeof(uint64_t), "");
In https://bugs.webkit.org/show_bug.cgi?id=224452#c26, Jonathan Wakely has a tip to rewrite the assert:
static_assert(sizeof(std::declval<Instance*>()->cachedStackLimit()) == sizeof(uint64_t), "");
It works.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210420/e7f63ee6/attachment.htm>
More information about the webkit-unassigned
mailing list